lib/zen/package/comments/lib/comments/controller/comments.rb in zen-0.2.4.1 vs lib/zen/package/comments/lib/comments/controller/comments.rb in zen-0.2.5

- old
+ new

@@ -1,9 +1,9 @@ #:nodoc: module Comments #:nodoc: - module Controllers + module Controller ## # Controller used for managing comments. Administrations can't actually # add new comments using the backend controller but can edit or delete them. # Comments can be submitted to any section entry as long as the section # allows it. When submitting a comment the user data such as the name and email @@ -11,14 +11,13 @@ # from the form that was submitted. # # @author Yorick Peterse # @since 0.1 # - class Comments < Zen::Controllers::AdminController - include ::Comments::Models + class Comments < Zen::Controller::AdminController + include ::Comments::Model - map '/admin/comments' - trait :extension_identifier => 'com.zen.comments' + map('/admin/comments') before_all do csrf_protection(:save, :delete) do respond(lang('zen_general.errors.csrf'), 403) end