BetterErrors / BetterErrors/better_errors
Instance variables are accessible, but method invocation seems to fail
- Dominant language
- Ruby
- Stars
- 6.9k
- Forks
- 430
- PR merge metrics
- No merged PRs in 30d
Description
REPL example:
``` ruby
>> @current_user
=> #
>> current_user
=> nil
```
The current_user method just sets @current_user. But what bothers me more is if I add the following code to a rails controller action:
``` ruby
raise session.inspect
```
Better errors shows:
RuntimeError at /
{"_csrf_token"=>"LZVL/M2eXukjsNYW2fvgaZaGFgXzAc+TReXv4JQXqRY=", "user_id"=>1, "flash"=>#, @closed=false, @flashes={:notice=>"Logged in!"}, @now=nil>}
However, in the REPL:
``` ruby
>> session
=> {}
```
Which would seem to make sense why at least my current_user method returns nil.
This is in a Rails 3.2 app, but even as I am upgrading to 4.1, I am getting the same behavior. I am methodically going through my dependencies, but any pointers would be appreciated!
I have skimmed the issues and none seem to match, please redirect me if I missed something!
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.