Created
February 27, 2017 11:15
-
-
Save leylaKapi/1783571d2daed6074a7e55d9a6f9da2d to your computer and use it in GitHub Desktop.
Giving path to link_to with id
This file contains 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
link_to "Comment wall", profile_path(@profile, :anchor => "wall") | |
// => <a href="/profiles/1#wall">Comment wall</a> | |
link_to "Ruby on Rails search", :controller => "searches", :query => "ruby on rails" | |
// => <a href="/searches?query=ruby+on+rails">Ruby on Rails search</a> | |
link_to "Nonsense search", searches_path(:foo => "bar", :baz => "quux") | |
// => <a href="/searches?foo=bar&baz=quux">Nonsense search</a> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment