lib/granite/form/model/associations/reflections/references_any.rb in granite-form-0.5.0 vs lib/granite/form/model/associations/reflections/references_any.rb in granite-form-0.6.0

- old
+ new

@@ -23,20 +23,20 @@ @name = name.to_sym end def klass @klass ||= if options[:data_source].present? - options[:data_source].to_s.constantize - else - super - end + options[:data_source].to_s.constantize + else + super + end end - alias_method :data_source, :klass + alias data_source klass def persistence_adapter @persistence_adapter ||= self.class.persistence_adapter(klass) - .new(data_source, options[:primary_key], @scope_proc) + .new(data_source, options[:primary_key], @scope_proc) end def read_source(object) object.read_attribute(reference_key) end