Class: Ishapi::VideosController
Instance Method Summary
collapse
#exception, #home, #long_term_token, #vote
Instance Method Details
#index ⇒ Object
10
11
12
13
14
|
# File 'app/controllers/ishapi/videos_controller.rb', line 10
def index
authorize! :index, Video
@videos = Video.all.published
@videos = @videos.page( params[:videos_page] ).per( 10 )
end
|
#show ⇒ Object
5
6
7
8
|
# File 'app/controllers/ishapi/videos_controller.rb', line 5
def show
@video = Video.unscoped.find_by :slug => params[:slug]
authorize! :show, @video
end
|