kelredd-resourceful 0.8.2 → 0.8.3
Sign up to get free protection for your applications and to get access to all the features.
@@ -26,7 +26,7 @@ module Resourceful::Model::ActiverecordAssociations
|
|
26
26
|
define_method(name) do |*args|
|
27
27
|
reload = args.first || false
|
28
28
|
if reload || (assoc_val = instance_variable_get("@#{clean_name}")).nil?
|
29
|
-
klass = class_name.kind_of(::String) ? class_name.resourceful_constantize : class_name
|
29
|
+
klass = class_name.kind_of?(::String) ? class_name.resourceful_constantize : class_name
|
30
30
|
raise ArgumentError, "has_many_resourceful :class_name '#{class_name}' is not defined" if klass.nil?
|
31
31
|
unless klass.respond_to?(find_method_name)
|
32
32
|
raise NotImplementedError, "has_many_resourceful expects #{klass} to implement a Findable method named '#{find_method_name}'"
|
@@ -63,7 +63,7 @@ module Resourceful::Model::ActiverecordAssociations
|
|
63
63
|
define_method(name) do |*args|
|
64
64
|
reload = args.first || false
|
65
65
|
if reload || (assoc_val = instance_variable_get("@#{clean_name}")).nil?
|
66
|
-
klass = if class_name.kind_of(::String)
|
66
|
+
klass = if class_name.kind_of?(::String)
|
67
67
|
if polymorphic
|
68
68
|
self.send("#{clean_name}_type")
|
69
69
|
else
|
data/lib/resourceful/version.rb
CHANGED