rails-console

How to see list of method parameters from the Rails console

How can I see a list of method parameters similar to how you can see methods for a Model/object like: >> nil.methods => ["returning", "inspect", "with_options", "tap", ..... So that I can do: >> nil.returning.attributes => some array or hash I know I can look up in the code, but sometimes it's just faster for the console ...

Ruby from the command line - sticking - Windows

I have seen this behavior on Windows with Ruby for a long time. If I install a gem sometimes the command line will just get "lost" and stop printing output until you go back to the command line and hit enter a few times. I notice this in other places too. Like starting up a Ruby on Rails console. Or generating a model with Rails. Have ...

~/.irbrc not executed when starting irb or script/console

Here's what I've tried: 1. gem install awesome_print 2. echo "require 'ap'" >> ~/.irbrc 3. chmod u+x ~/.irbrc 4. script/console 5. ap { :test => 'value' } Result: NameError: undefined local variable or method `ap' for # ...

On Ruby on Rails' script/console, is there a way to print out all the models in your app? (all ActiveRecord subclasses)

which is to find out all the Models in the app. This can be found out from the project folders / filenames, or in the route.rb, but just wonder if there is a Ruby way of finding it out on script/console? ...