The Rails console is a wonderful place to be if you need to feel things out in a Rails application. Playing with your models in the console is easy. They are all just there. But two non-model functions I frequently find myself want to play with are view helpers and route helpers. They are there too, but they are abstracted behind objects whose name I’m constantly forgetting. I’m documenting them here in the hopes that it’ll help me remember and or make their names easy to find the next time I inevitably forget.
Route helpers are available on the app object:
View helpers are available on the helper object:
These helpers go back at least as far back as Rails 2.1.
© 2012 John Parker | Valid XHTML 1.0 Strict | Valid CSS 2.1