You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Railties can hook themselves into the `rails console` with:
```ruby
class Railtie < ::Rails::Railtie
console do
# Do something here.
end
end
```
Now, since I introduced the `#console` method in `Kernel`, every object
responded to it, so this block was tried to be run on railties that
respond to it.
Marking the `#console` method _explicitly_ as `module_function`
solves this problem as it makes it `private` and the `#respond_to?`
calls during the railties initialization no longer lie.
Fixes#184.
0 commit comments