Class: Txtblx::TextblocksController
- Inherits:
-
ApplicationController
- Object
- ActionController::Base
- ApplicationController
- Txtblx::TextblocksController
- Defined in:
- app/controllers/txtblx/textblocks_controller.rb
Instance Method Summary collapse
Instance Method Details
#update ⇒ Object
3 4 5 6 7 8 9 10 11 |
# File 'app/controllers/txtblx/textblocks_controller.rb', line 3 def update @textblock = Textblock.drafts.where(perma_id: params[:id]).first! (:update, @textblock) @textblock.text = params[:textblock][:text] @textblock.save @textblock.publish render json: @textblock end |