Created
October 23, 2013 10:41
-
-
Save Incanus3/7116369 to your computer and use it in GitHub Desktop.
pry debugging
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
From: /home/jakub/.rvm/gems/ruby-2.0.0-p247@objednavky/gems/devise-3.1.1/lib/devise/controllers/helpers.rb @ line 254 Devise::Controllers::Helpers#sign_in_and_redirect: | |
252: def sign_in_and_redirect(resource_or_scope, *args) | |
253: options = args.extract_options! | |
=> 254: scope = Devise::Mapping.find_scope!(resource_or_scope) | |
255: resource = args.last || resource_or_scope | |
256: sign_in(scope, resource, options) | |
257: redirect_to after_sign_in_path_for(resource) | |
258: end | |
[17] pry(#<SessionsController>)> next | |
From: /home/jakub/.rvm/gems/ruby-2.0.0-p247@objednavky/gems/devise-3.1.1/lib/devise/mapping.rb @ line 33 Devise::Mapping.find_scope!: | |
32: def self.find_scope!(obj) | |
=> 33: case obj | |
34: when String, Symbol | |
35: return obj | |
36: when Class | |
37: Devise.mappings.each_value { |m| return m.name if obj <= m.to } | |
38: else | |
39: Devise.mappings.each_value { |m| return m.name if obj.is_a?(m.to) } | |
40: end | |
41: | |
42: raise "Could not find a valid mapping for #{obj.inspect}" | |
43: end | |
[18] pry(Devise::Mapping)> show-stack | |
No caller stack available! |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment