Created
March 7, 2012 04:17
-
-
Save azuby/1990902 to your computer and use it in GitHub Desktop.
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
def show_link(object, content = image_tag("view.png", :alt => "View"), *args) | |
link_to(content, object, args) if can?(:show, object) | |
end | |
def link_to_create_association(object, association_class, content = "Add " + association_class.name.titleize, *args) | |
if can?(:create, association_class) | |
link_to(content, "#", :class => "add-fields-button", :"data-fields" => association_class.name.underscore, args) | |
end | |
end | |
Error: /app/helpers/application_helper.rb:52: syntax error, unexpected ')', expecting tASSOC |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment