Class: Cmsable::CmsableController
- Inherits:
-
ApplicationController
- Object
- ApplicationController
- Cmsable::CmsableController
- Defined in:
- app/controllers/cmsable/cmsable_controller.rb
Instance Method Summary collapse
Instance Method Details
#update ⇒ Object
3 4 5 6 7 8 9 10 |
# File 'app/controllers/cmsable/cmsable_controller.rb', line 3 def update model = params[:model].constantize render :text => false and return if cannot? :update, model attribute = model.cmsable_body render :text => model.find(params[:id]).update_attribute(attribute, params[:content][:body]) end |