Class: IshLibManager::PhotosController
- Inherits:
-
ApplicationController
- Object
- ActionController::Base
- ApplicationController
- IshLibManager::PhotosController
- Defined in:
- app/controllers/ish_lib_manager/photos_controller.rb
Instance Method Summary collapse
Methods inherited from ApplicationController
Instance Method Details
#destroy ⇒ Object
8 9 10 11 12 13 |
# File 'app/controllers/ish_lib_manager/photos_controller.rb', line 8 def destroy @photo = Photo.unscoped.find params[:id] @photo.is_trash = true @photo.save redirect_to request.referrer end |
#show ⇒ Object
15 16 17 |
# File 'app/controllers/ish_lib_manager/photos_controller.rb', line 15 def show @photo = Photo.unscoped.find params[:id] end |
#without_gallery ⇒ Object
4 5 6 |
# File 'app/controllers/ish_lib_manager/photos_controller.rb', line 4 def without_gallery @photos = Photo.unscoped.where( :gallery => nil, :is_trash => false ) end |