better decorator detection
This commit is contained in:
parent
f4814651ba
commit
6523f9587f
|
@ -65,8 +65,8 @@ module SemanticRailsViewHelpers
|
||||||
def semantic_model_data(object)
|
def semantic_model_data(object)
|
||||||
SemanticRailsViewHelpers.with_semantic_data do
|
SemanticRailsViewHelpers.with_semantic_data do
|
||||||
type = begin
|
type = begin
|
||||||
if object.respond_to?(:model)
|
if object.respond_to?(:source) and object.respond_to?(:to_source)
|
||||||
object.model.class
|
object.source.class
|
||||||
else
|
else
|
||||||
object.class
|
object.class
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in New Issue