Sha256: a2c2ffe289768344970113d347f4be04db3b99f25ed48c22b065803a8c23244f
Contents?: true
Size: 701 Bytes
Versions: 90
Compression:
Stored size: 701 Bytes
Contents
require_dependency "ishapi/application_controller" module Ishapi class VideosController < ApplicationController def show @video = Video.unscoped.find_by :name_seo => params[:name_seo] authorize! :show, @video end def index authorize! :index, Video @videos = Video.all if params[:cityname] city = City.find_by :cityname => params[:cityname] @videos = @videos.where( :city_id => city.id ) end if params[:domain] site = Site.find_by :domain => params[:domain], :lang => :en @videos = @videos.where( :site_id => site.id ) end @videos = @videos.page( params[:videos_page] ).per( 10 ) end end end
Version data entries
90 entries across 90 versions & 1 rubygems