Ask A Question

Notifications

You’re not receiving notifications from this thread.

Rails Console

Chris Ma asked in Rails

Hi all,

This might be a retarded question but how do I access things other than Models in rails console, such as Controller methods, engines etc.? I wouldn't mind seeing a video dedicated to console and the extent on what you can look up.

Cheers,
Chris

Reply

This page on the rails guide shows more things you can do

http://guides.rubyonrails.org/command_line.html

It looks like you have access to the app and helper methods as well.

Reply

What Andrew said! For some of the controller methods, you can sometimes just instantiate the class like any other normal object. The trouble will be that you don't have request objects to work with to pass in.

Reply
Join the discussion
Create an account Log in

Want to stay up-to-date with Ruby on Rails?

Join 86,946+ developers who get early access to new tutorials, screencasts, articles, and more.

    We care about the protection of your data. Read our Privacy Policy.