Created
July 28, 2011 20:14
-
-
Save adrianrodriguez/1112438 to your computer and use it in GitHub Desktop.
Adding multiple html attributes in rails
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
-# I'm trying to add another attribute to this link, but having trouble figuring out how to do it | |
-# For example, I want to add :style => "display: none" to this line | |
%strong= link_to "view this", current_user, :class => "public-on" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Even though we just talked about it, adding it here for documentation sake: :)
To see this, add back the full syntax:
link_to("view this", current_user, {:class => "public-on"})
link_to("view this", current_user, {:class => "public-on", :foo => "bar"})
link_to "view this", current_user, :class => "public-on", :foo => "bar"