Sha256: 31aaa264c06e6c751c52d356d7862ef73842d167c7083a76c4030823b35d45e4
Contents?: true
Size: 696 Bytes
Versions: 1
Compression:
Stored size: 696 Bytes
Contents
# # Blogaze # Copyright (C) 2011-2013 Jack Polgar # # Blogaze is released under the BSD 3-clause license. # @license http://opensource.org/licenses/BSD-3-Clause # module Blogaze module Admin class Comments < Controller map '/admin/comments' def index @comments = Comment.all respond(view_file('admin/comments/index')) end def approve(comment_id) Comment[comment_id].update(:in_moderation => 0).save flash[:success] = "Comment approved" redirect r('/') end def delete(comment_id) Comment[comment_id].delete flash[:success] = "Comment deleted" redirect r('/') end end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
blogaze-0.0.1 | lib/blogaze/controller/admin/comments.rb |