more updates
This commit is contained in:
parent
9fd95b611c
commit
5bf8939a43
|
@ -12,13 +12,18 @@ module SemanticRailsViewHelpers
|
||||||
end
|
end
|
||||||
|
|
||||||
def link_to_route(route, *args)
|
def link_to_route(route, *args)
|
||||||
link_to t(".#{route}"), send("#{route}_path", *args), semantic_link_data(route)
|
options = {}
|
||||||
|
if args.last.kind_of?(::Hash)
|
||||||
|
options = args.pop
|
||||||
end
|
end
|
||||||
|
|
||||||
def link_to_collection(route)
|
link_to t(".#{route}"), send("#{route}_path", *args), semantic_link_data(route).merge(options)
|
||||||
|
end
|
||||||
|
|
||||||
|
def link_to_collection(route, options = {})
|
||||||
collection = route.last
|
collection = route.last
|
||||||
|
|
||||||
link_to t(".#{collection}"), polymorphic_url(route), semantic_link_data(collection)
|
link_to t(".#{collection}"), polymorphic_url(route), semantic_link_data(collection).merge(options)
|
||||||
end
|
end
|
||||||
|
|
||||||
def link_to_model(model)
|
def link_to_model(model)
|
||||||
|
|
Loading…
Reference in New Issue