Class: Tandem::ContentsController
- Inherits:
-
ApplicationController
- Object
- ActionController::Base
- ApplicationController
- Tandem::ContentsController
- Defined in:
- app/controllers/tandem/contents_controller.rb
Instance Method Summary collapse
-
#edit ⇒ Object
GET /contents/1/edit.
-
#update ⇒ Object
PUT /contents/1 PUT /contents/1.json.
Methods inherited from ApplicationController
Instance Method Details
#edit ⇒ Object
GET /contents/1/edit
77 78 |
# File 'app/controllers/tandem/contents_controller.rb', line 77 def edit end |
#update ⇒ Object
PUT /contents/1 PUT /contents/1.json
82 83 84 85 86 87 88 89 90 91 92 |
# File 'app/controllers/tandem/contents_controller.rb', line 82 def update param_key = ActiveModel::Naming.param_key(@content) respond_to do |format| if @content.update_attributes(params[param_key]) format.json { render json: @content } else format.json { render json: @content.errors, status: :unprocessable_entity } end end end |