add options

This commit is contained in:
John Bintz 2013-01-12 13:39:10 -05:00
parent 60992cf1fb
commit 6dc55b246b
1 changed files with 2 additions and 2 deletions

View File

@ -26,11 +26,11 @@ module SemanticRailsViewHelpers
link_to t(".#{collection}"), polymorphic_url(route), semantic_link_data(collection).merge(options)
end
def link_to_model(model)
def link_to_model(model, options = {})
route = model
route = route.to_route if route.respond_to?(:to_route)
link_to model.to_label, polymorphic_url(route), semantic_model_data(model).merge(semantic_action_data('show'))
link_to model.to_label, polymorphic_url(route), semantic_model_data(model).merge(semantic_action_data('show')).merge(options)
end
def link_to_model_action(model, action = :show, options = {})