Module: Refinery::AuthenticatedSystem

Defined in:
authentication/lib/refinery/authenticated_system.rb

Class Method Summary (collapse)

Instance Method Summary (collapse)

Class Method Details

+ (Object) included(base)



35
36
37
38
39
40
# File 'authentication/lib/refinery/authenticated_system.rb', line 35

def self.included(base)
  if base.respond_to? :helper_method
    base.send :helper_method, :current_refinery_user, :current_user_session,
                              :refinery_user_signed_in?, :refinery_user?
  end
end

Instance Method Details

- (Object) after_sign_in_path_for(resource_or_scope)

This just defines the devise method for after sign in to support extension namespace isolation...



19
20
21
22
23
# File 'authentication/lib/refinery/authenticated_system.rb', line 19

def (resource_or_scope)
  scope = Devise::Mapping.find_scope!(resource_or_scope)
  home_path = "#{scope}_root_path"
  respond_to?(home_path, true) ? refinery.send(home_path) : refinery.admin_root_path
end

- (Object) after_sign_out_path_for(resource_or_scope)



25
26
27
# File 'authentication/lib/refinery/authenticated_system.rb', line 25

def after_sign_out_path_for(resource_or_scope)
  refinery.root_path
end