Class: Admix::PhotosController
- Inherits:
-
AdmixController
- Object
- AdmixController
- Admix::PhotosController
- Defined in:
- app/controllers/admix/photos_controller.rb
Instance Method Summary collapse
- #image_param ⇒ Object
-
#update_description ⇒ Object
TODO: Maybe we need to skip authorization here.
- #upload ⇒ Object
Instance Method Details
#image_param ⇒ Object
27 28 29 30 31 |
# File 'app/controllers/admix/photos_controller.rb', line 27 def image_param if params[:image] params[:photo] = { image: params[:image] } end end |
#update_description ⇒ Object
TODO: Maybe we need to skip authorization here. But not authetication.
14 15 16 17 18 19 20 |
# File 'app/controllers/admix/photos_controller.rb', line 14 def update_description @album = Album.find(params[:album_id]) @photo = @album.photos.find(params[:id]) @photo.description = params[:description] @photo.save() render :json => @photo end |
#upload ⇒ Object
23 24 25 |
# File 'app/controllers/admix/photos_controller.rb', line 23 def upload render inline: params.to_s end |