Sha256: 464097769f0fddc88e4b02c5a4beec24d2e1cbd60b8b3d05ca1814506f82e1b6
Contents?: true
Size: 735 Bytes
Versions: 22
Compression:
Stored size: 735 Bytes
Contents
require_dependency "ishapi/application_controller" module Ishapi class CitiesController < Ishapi::ApplicationController 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
22 entries across 22 versions & 1 rubygems