Created
July 1, 2014 04:27
-
-
Save jdibiccari/6ff8249c964afb26a83e to your computer and use it in GitHub Desktop.
blog_post
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#Utilize the helper variable | |
helper.truncate("Rails is a magical thing", length: 11) | |
#=>"Rails is..." | |
helper.pluralize(2, "sandbox") | |
#=> "2 sandboxes" | |
#Or the app variable...(don't mind me as I switch domains) | |
pond = Pond.last | |
app.pond_path(pond) | |
#=>"/ponds/9" | |
#How about app and helper! | |
helper.link_to(pond.name, app.pond_path(pond)) | |
#=> "<a href=\"/ponds/9\">Greenwood</a>" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment