Saturday, March 15, 2008

Calling helpers in the rails console.

Trying to debug some asset tag helper issues and I found this...

Did you know you can call helpers directly in the rails console? Just use the helper object...

>> helper.link_to "this", "that"
=> <a href="that">this</a>


You can also call custom helpers (from your app), but I haven't tried it:

>> helper :my_custom_helper

2 comments:

katch wreck said...

thanks! that helped a lot

Anonymous said...

you can even "extend them in":
helper.extend your_desired_helper