Class: Blogaze::Controllers::Admin::Comments
- Inherits:
-
Controller
- Object
- Ramaze::Controller
- Controller
- Controller
- Blogaze::Controllers::Admin::Comments
- Defined in:
- lib/blogaze/controllers/admin/comments.rb
Instance Method Summary collapse
-
#approve(comment_id) ⇒ Object
Approve comment.
-
#delete(comment_id) ⇒ Object
Delete comment.
-
#index ⇒ Object
List comments.
Methods inherited from Controller
Methods inherited from Controller
#get_settings, #initialize, #title, #view_file
Constructor Details
This class inherits a constructor from Blogaze::Controllers::Admin::Controller
Instance Method Details
#approve(comment_id) ⇒ Object
Approve comment
29 30 31 32 33 |
# File 'lib/blogaze/controllers/admin/comments.rb', line 29 def approve(comment_id) ::Blogaze::Models::Comment[comment_id].update(:in_moderation => 0).save flash[:success] = "Comment approved" redirect r('/') end |