Class: Designer::ImagesController
- Inherits:
-
ApplicationController
- Object
- ActionController::Base
- ApplicationController
- Designer::ImagesController
- Defined in:
- app/controllers/designer/images_controller.rb
Instance Method Summary collapse
- #create ⇒ Object
- #destroy ⇒ Object
-
#index ⇒ Object
skip_before_action :verify_authenticity_token.
Instance Method Details
#create ⇒ Object
13 14 15 16 17 |
# File 'app/controllers/designer/images_controller.rb', line 13 def create @resource..attach(params[:file]) render json: designer_images_json end |
#destroy ⇒ Object
19 20 21 |
# File 'app/controllers/designer/images_controller.rb', line 19 def destroy @attachment.purge_later end |
#index ⇒ Object
skip_before_action :verify_authenticity_token
9 10 11 |
# File 'app/controllers/designer/images_controller.rb', line 9 def index render json: designer_images_json end |