seamusabshere-csv_dictionary 0.0.2 → 0.0.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/VERSION.yml +1 -1
- data/lib/csv_dictionary.rb +2 -3
- metadata +1 -1
data/VERSION.yml
CHANGED
data/lib/csv_dictionary.rb
CHANGED
@@ -87,7 +87,6 @@ module ActiveRecord
|
|
87
87
|
|
88
88
|
module ClassMethods
|
89
89
|
def csv_dictionary(key_name, options = {})
|
90
|
-
class_eval { @old_method_missing = instance_method(:method_missing) }
|
91
90
|
self.csv_dictionaries ||= {}
|
92
91
|
csv_dictionaries[key_name] = CsvDictionary.new(key_name, options)
|
93
92
|
extend InstanceMethods
|
@@ -113,7 +112,7 @@ module ActiveRecord
|
|
113
112
|
def method_missing_with_csv_dictionary_attributes(method_id, *arguments, &block)
|
114
113
|
if match = DynamicFinderMatch.match(method_id)
|
115
114
|
attribute_names = match.attribute_names
|
116
|
-
return method_missing_without_csv_dictionary_attributes(method_id, arguments, block) unless all_attributes_or_csv_dictionary_attributes_exists?(attribute_names)
|
115
|
+
return method_missing_without_csv_dictionary_attributes(method_id, *arguments, &block) unless all_attributes_or_csv_dictionary_attributes_exists?(attribute_names)
|
117
116
|
if match.finder?
|
118
117
|
finder = match.finder
|
119
118
|
bang = match.bang?
|
@@ -226,7 +225,7 @@ module ActiveRecord
|
|
226
225
|
send(method_id, *arguments, &block)
|
227
226
|
end
|
228
227
|
else
|
229
|
-
method_missing_without_csv_dictionary_attributes(method_id, arguments, block)
|
228
|
+
method_missing_without_csv_dictionary_attributes(method_id, *arguments, &block)
|
230
229
|
end
|
231
230
|
end
|
232
231
|
alias_method_chain :method_missing, :csv_dictionary_attributes
|