Removing inline rescue in favor of where/try combination for label ID in setter method. Thanks @mariovisic\!

This commit is contained in:
waynegerard 2012-05-22 18:27:38 -07:00
parent be26ae3059
commit 2fa81112fc
1 changed files with 1 additions and 1 deletions

View File

@ -86,7 +86,7 @@ module Locomotive
def label_field_id=(value)
# update the label_field_name if the label_field_id is changed
new_label_field_name = self.entries_custom_fields.find(value).name rescue nil
new_label_field_name = self.entries_custom_fields.where(:_id =>value).first.try(:name)
self.label_field_name = new_label_field_name
super(value)
end