Class: Dust::Gallery::Api::PhotosController
Instance Method Summary
collapse
#not_authenticated, #permission_denied, #try_return_to_previous_page
Instance Method Details
#create ⇒ Object
12
13
14
15
|
# File 'app/controllers/dust/gallery/api/photos_controller.rb', line 12
def create
file = AppSpecificStringIO.new(params[:qqfile], request.raw_post)
respond_with Dust::Gallery::Photo.create :filename => file, :album_id => params[:album_id]
end
|
#destroy ⇒ Object
21
22
23
|
# File 'app/controllers/dust/gallery/api/photos_controller.rb', line 21
def destroy
respond_with Dust::Gallery::Photo.destroy params[:id]
end
|
#show ⇒ Object
8
9
10
|
# File 'app/controllers/dust/gallery/api/photos_controller.rb', line 8
def show
respond_with Dust::Gallery::Photo.find(params[:id])
end
|
#update ⇒ Object
17
18
19
|
# File 'app/controllers/dust/gallery/api/photos_controller.rb', line 17
def update
respond_with Dust::Gallery::Photo.update params[:dust_gallery_photo]
end
|