Class: HeraCms::ImagesController
- Inherits:
-
ApplicationController
- Object
- ActionController::Base
- ApplicationController
- HeraCms::ImagesController
- Defined in:
- app/controllers/hera_cms/images_controller.rb
Instance Method Summary collapse
Instance Method Details
#update ⇒ Object
6 7 8 9 10 11 12 13 14 |
# File 'app/controllers/hera_cms/images_controller.rb', line 6 def update @image = HeraCms::Image.find(params[:id]) if @image.update(image_params) render json: { redirect: URI(request.referer).path }, status: 200 else render json: { errors: @image.errors. }, status: 422 end end |