Class: IshLibManager::PhotosController

Inherits:
ApplicationController show all
Defined in:
app/controllers/ish_lib_manager/photos_controller.rb

Instance Method Summary collapse

Methods inherited from ApplicationController

#set_lists

Instance Method Details

#destroyObject



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

#showObject



15
16
17
# File 'app/controllers/ish_lib_manager/photos_controller.rb', line 15

def show
  @photo = Photo.unscoped.find params[:id]
end


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