Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Rails 2: test 'link_to' and other view helpers from the rails console?

In rails 2, I use the console a lot and was wondering what the best way to test view helpers such as 'link_to' or 'url_for' using it.

What's the best way to do this?

like image 944
Kevin Bedell Avatar asked Dec 01 '10 16:12

Kevin Bedell


1 Answers

You can add your include ActionView::Helpers::UrlHelper to ~/.irbrc to auto load it when you start the console.

like image 139
EmFi Avatar answered Oct 12 '22 12:10

EmFi