better decorator detection

This commit is contained in:
John Bintz 2013-02-24 17:51:24 -05:00
parent f4814651ba
commit 6523f9587f
1 changed files with 2 additions and 2 deletions

View File

@ -65,8 +65,8 @@ module SemanticRailsViewHelpers
def semantic_model_data(object)
SemanticRailsViewHelpers.with_semantic_data do
type = begin
if object.respond_to?(:model)
object.model.class
if object.respond_to?(:source) and object.respond_to?(:to_source)
object.source.class
else
object.class
end