module Challah::Controller::ClassMethods
Public Instance Methods
restrict_to_authenticated(options = {})
click to toggle source
Restrict the current controller to only users that have authenticated. All actions in the controller will be restricted unless otherwise stated. All normal options for a before_action are observed.
@example
class YourController < ApplicationController restrict_to_authenticated # ... end
@example Restrict only the given actions
class YourOtherController < ApplicationController restrict_to_authenticated :only => [ :create, :update, :destroy ] # ... end
@see Controller::InstanceMethods#signin_required signin_required
# File lib/challah/controller.rb, line 31 def restrict_to_authenticated(options = {}) before_action(options) do |controller| controller.send(:signin_required) end end
signin_required(*args)
click to toggle source
Alias for restrict_to_authenticated
# File lib/challah/controller.rb, line 38 def signin_required(*args) restrict_to_authenticated(*args) end
Also aliased as: login_required