Module: Cassiopeia::ActionControllerServerMixin
- Defined in:
- lib/cassiopeia/action_controller_server_mixin.rb
Defined Under Namespace
Modules: ActionControllerMethods
Instance Method Summary collapse
Instance Method Details
#acts_as_cas_controller {|controllerConfig| ... } ⇒ Object
152 153 154 155 156 157 158 159 160 161 162 163 164 165 |
# File 'lib/cassiopeia/action_controller_server_mixin.rb', line 152 def acts_as_cas_controller defaultTicketClass = ((defined? Ticket)?(Ticket):(Class)) defaultConfig = { :ticketClass => defaultTicketClass, :rolesMethod => :roles } controllerConfig = Cassiopeia::TicketsControllerConfig.new defaultConfig yield controllerConfig Cassiopeia::CONFIG[:rolesMethod], Cassiopeia::CONFIG[:ticketClass] = controllerConfig.rolesMethod, controllerConfig.ticketClass skip_before_filter :verify_authenticity_token, :only=> [:create, :index] before_filter :require_user, :except => [:create, :index] before_filter :cas_store_params, :cas_create_or_find_ticket, :cas_require_config include ActionControllerMethods end |