Class: Ishapi::My::GalleriesController

Inherits:
MyController show all
Defined in:
app/controllers/ishapi/my/galleries_controller.rb

Instance Method Summary collapse

Methods inherited from MyController

#account

Methods inherited from ApplicationController

#home, #long_term_token, #test

Instance Method Details

#indexObject

expects params



5
6
7
8
9
# File 'app/controllers/ishapi/my/galleries_controller.rb', line 5

def index
  authorize! :my_index, Gallery
  @galleries = @current_user.profile.galleries.unscoped.where( is_trash: false ).order_by( created_at: :desc ).limit(20)
  render 'ishapi/galleries/index'
end