Class: Cropper::UploadsController
- Inherits:
-
ApplicationController
- Object
- ApplicationController
- Cropper::UploadsController
- Defined in:
- app/controllers/cropper/uploads_controller.rb
Instance Method Summary collapse
- #create ⇒ Object
- #destroy ⇒ Object
- #edit ⇒ Object
- #index ⇒ Object
- #new ⇒ Object
- #show ⇒ Object
- #update ⇒ Object
Instance Method Details
#create ⇒ Object
22 23 24 25 26 27 28 |
# File 'app/controllers/cropper/uploads_controller.rb', line 22 def create @upload.holder ||= @holder @upload.update_attributes(params[:upload]) respond_with(@upload) do |format| format.js { render :partial => 'crop' } end end |
#destroy ⇒ Object
41 42 43 44 |
# File 'app/controllers/cropper/uploads_controller.rb', line 41 def destroy @upload.destroy head :ok end |
#edit ⇒ Object
30 31 32 33 34 |
# File 'app/controllers/cropper/uploads_controller.rb', line 30 def edit respond_with(@upload) do |format| format.js { render :partial => 'crop' } end end |
#index ⇒ Object
8 9 10 |
# File 'app/controllers/cropper/uploads_controller.rb', line 8 def index respond_with(@uploads) end |
#new ⇒ Object
16 17 18 19 20 |
# File 'app/controllers/cropper/uploads_controller.rb', line 16 def new respond_with @upload do |format| format.js { render :partial => 'pick' } end end |
#show ⇒ Object
12 13 14 |
# File 'app/controllers/cropper/uploads_controller.rb', line 12 def show respond_with(@upload) end |
#update ⇒ Object
36 37 38 39 |
# File 'app/controllers/cropper/uploads_controller.rb', line 36 def update @upload.update_attributes(params[:upload]) redirect_to @holder end |