app/models/apidae/selection.rb in apidae-0.7.6 vs app/models/apidae/selection.rb in apidae-0.7.7
- old
+ new
@@ -93,10 +93,10 @@
if res[:results] && res[:results].length == 1
obj_data = res[:results].first.deep_symbolize_keys
obj = Obj.find_by_apidae_id(apidae_obj_id)
if obj
refreshed = Obj.update_object(obj, obj_data)
- if refreshed && Rails.application.config.apidae_obj_refresh_callback
+ if refreshed && Rails.application.config.respond_to?(:apidae_obj_refresh_callback)
Rails.application.config.apidae_obj_refresh_callback.call(apidae_obj_id)
end
refreshed
end
end