Module: RailsPageComment::ControllerAdditions::ClassMethods
- Defined in:
- lib/rails_page_comment/controller_additions.rb
Instance Method Summary collapse
- #notify_changes_class ⇒ Object
-
#page_comment_resource(*args) ⇒ Object
Sets up a before filter which loads and authorizes the current resource.
- #page_comment_resource_class ⇒ Object
Instance Method Details
#notify_changes_class ⇒ Object
21 22 23 |
# File 'lib/rails_page_comment/controller_additions.rb', line 21 def notify_changes_class RailsPageComment.notify_changes_class_name.to_s.camelize.constantize end |
#page_comment_resource(*args) ⇒ Object
Sets up a before filter which loads and authorizes the current resource. This performs both
class BooksController < ApplicationController
page_comment_resource
end
12 13 14 |
# File 'lib/rails_page_comment/controller_additions.rb', line 12 def page_comment_resource(*args) page_comment_resource_class.add_after_filter(self, :page_comment_resource, *args) end |
#page_comment_resource_class ⇒ Object
16 17 18 |
# File 'lib/rails_page_comment/controller_additions.rb', line 16 def page_comment_resource_class ControllerResource end |