Improved error handling.
This commit is contained in:
parent
e9dc5a3ea0
commit
9bb73f3b43
1 changed files with 6 additions and 1 deletions
|
@ -1148,7 +1148,12 @@ get assets and record_ids of selector
|
|||
send(selector).each {|item, content|
|
||||
attribute = item.split(/\./)
|
||||
next if !attribute[1]
|
||||
begin
|
||||
attribute_class = attribute[0].to_classname.constantize
|
||||
rescue => e
|
||||
logger.error "Unable to get asset for '#{attribute[0]}': #{e.inspect}"
|
||||
next
|
||||
end
|
||||
reflection = attribute[1].sub(/_id$/, '')
|
||||
#reflection = reflection.to_sym
|
||||
next if !models[attribute_class]
|
||||
|
|
Loading…
Reference in a new issue