Skip to content

Commit e9550f9

Browse files
authored
Merge pull request #72 from jkowens/patch-1
Define the modeled association on the child class
2 parents ca45207 + 5277d81 commit e9550f9

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

lib/harvesting/models/base.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,7 @@ def self.attributed(*attribute_names)
108108
def self.modeled(opts = {})
109109
opts.each do |attribute_name, model|
110110
attribute_name_string = attribute_name.to_s
111-
Harvesting::Models::Base.send :define_method, attribute_name_string do
111+
define_method(attribute_name_string) do
112112
@models[attribute_name_string] ||= model.new(@attributes[attribute_name_string] || {}, harvest_client: harvest_client)
113113
end
114114
end

0 commit comments

Comments
 (0)