Class: Ecm::Comments::Backend::CommentsController
- Inherits:
-
Itsf::Backend::Resource::BaseController
- Object
- Itsf::Backend::Resource::BaseController
- Ecm::Comments::Backend::CommentsController
- Defined in:
- app/controllers/ecm/comments/backend/comments_controller.rb
Class Method Summary collapse
Instance Method Summary collapse
Class Method Details
.resource_class ⇒ Object
5 6 7 |
# File 'app/controllers/ecm/comments/backend/comments_controller.rb', line 5 def self.resource_class Ecm::Comments::Comment end |
Instance Method Details
#create ⇒ Object
9 10 11 12 13 14 15 |
# File 'app/controllers/ecm/comments/backend/comments_controller.rb', line 9 def create @resource = initialize_scope.new(permitted_params) @resource.creator = current_user @resource.created_by_ip_address = request.remote_ip @resource.save respond_with @resource, location: after_create_location end |
#update ⇒ Object
17 18 19 20 21 22 23 |
# File 'app/controllers/ecm/comments/backend/comments_controller.rb', line 17 def update @resource = load_resource @resource.updater = current_user @resource.updated_by_ip_address = request.remote_ip @resource.update(permitted_params) respond_with @resource, location: after_update_location end |