Helpers in Rails Console

Rails gives you a helper local variable to play with.

$ ruby script/console
Loading development environment. 
>> helper.pluralize 2, "story" 
=> "2 stories" 
>> helper.submit_tag
=> "<input name=\"commit\" type=\"submit\" value=\"Save changes\" />" 
>> helper.visual_effect :blindUp, 'post'
=> "new Effect.BlindUp(\"post\",{});" 

Comments

Popular posts from this blog

Overview of Natural Language Processing (NLP)

Basic XML Questions and Answers