Created
July 22, 2008 20:00
-
-
Save mrb/1245 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
module ApplicationHelper | |
def e_tag(model) | |
eval("link_to image_tag(\'pencil.png\'), edit_#{model.class.name.underscore}_path(model)") | |
end | |
def d_tag(model) | |
eval("link_to image_tag(\'delete.png\'), model, :confirm => \'Are you sure?\', :method => :delete") | |
end | |
def n_tag(model) | |
eval("link_to image_tag(\'add.png\'), new_#{model}_path") | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment