Class: Admin::ImagesController
- Inherits:
-
AdminController
- Object
- AdminController
- Admin::ImagesController
- Defined in:
- app/controllers/c/admin/images_controller.rb
Instance Method Summary collapse
Instance Method Details
#create ⇒ Object
8 9 10 11 12 13 14 15 16 17 18 |
# File 'app/controllers/c/admin/images_controller.rb', line 8 def create # Take upload from params[:file] and store it somehow... # Optionally also accept params[:hint] and consume if needed image = C::Image.create!(image: params[:file]) render json: { image: { url: image.image.url } }, content_type: 'text/html' end |