Sha256: bf6e59f666c0b3d0640f9d51c7dace269c49f9d47eab16293dc84928dfc81a20
Contents?: true
Size: 734 Bytes
Versions: 25
Compression:
Stored size: 734 Bytes
Contents
require_dependency "ishapi/application_controller" module Ishapi class CitiesController < UnrestrictedController protect_from_forgery :prepend => true, :with => :exception layout :false check_authorization skip_before_action :verify_authenticity_token before_action :set_current_ability def index authorize! :index, City @cities = City.all end def features authorize! :index, City @cities = City.where( :is_feature => true ) end def show @city = City.find_by :cityname => params[:cityname] authorize! :show, @city end private def set_current_ability @current_ability ||= ::Ishapi::Ability.new( User.new ) end end end
Version data entries
25 entries across 25 versions & 1 rubygems