Class: Intro::Admin::ImagesController

Inherits:
ApplicationController show all
Defined in:
app/controllers/intro/admin/images_controller.rb

Instance Method Summary collapse

Methods inherited from Intro::ApplicationController

#current_user

Instance Method Details

#createObject



12
13
14
15
16
17
18
19
# File 'app/controllers/intro/admin/images_controller.rb', line 12

def create
  uploader = Intro::ImageUploader.new

  uploader.cache!(params[:image])
  uploader.store!

  render json: { data: { url: uploader.url } }
end