more fixes
This commit is contained in:
parent
517c7d6937
commit
7d43b998c5
|
@ -52,10 +52,7 @@ module SemanticRailsViewHelpers
|
||||||
route = model
|
route = model
|
||||||
route = route.to_route if route.respond_to?(:to_route)
|
route = route.to_route if route.respond_to?(:to_route)
|
||||||
|
|
||||||
data = semantic_action_data(target_action)
|
data = semantic_action_data(target_action).merge(semantic_model_data(model))
|
||||||
if action != :new
|
|
||||||
data.merge!(semantic_model_data(model))
|
|
||||||
end
|
|
||||||
|
|
||||||
link_to label, polymorphic_url(route, :action => action), options.merge(data)
|
link_to label, polymorphic_url(route, :action => action), options.merge(data)
|
||||||
end
|
end
|
||||||
|
@ -75,7 +72,12 @@ module SemanticRailsViewHelpers
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
{ 'data-type' => type, 'data-id' => object.id }
|
output = { 'data-type' => type }
|
||||||
|
if !object.new_record?
|
||||||
|
output['data-id'] = object.id
|
||||||
|
end
|
||||||
|
|
||||||
|
output
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue