ozsantana-has_many_select 0.0.2 → 0.0.3
Sign up to get free protection for your applications and to get access to all the features.
- data/History.txt +4 -0
- data/lib/has_many_select/association_proxy.rb +1 -1
- data/lib/has_many_select/version.rb +1 -1
- metadata +1 -1
data/History.txt
CHANGED
@@ -7,7 +7,7 @@ module ActiveRecord
|
|
7
7
|
record["#{@reflection.options[:as]}_id"] = @owner.id unless @owner.new_record?
|
8
8
|
record["#{@reflection.options[:as]}_type"] = @owner.class.base_class.name.to_s
|
9
9
|
elsif @reflection.options[:primary_key]
|
10
|
-
record[@reflection.primary_key_name] =
|
10
|
+
record[@reflection.primary_key_name] = @owner.send(@reflection.options[:primary_key]) unless @owner.new_record?
|
11
11
|
else
|
12
12
|
record[@reflection.primary_key_name] = @owner.id unless @owner.new_record?
|
13
13
|
end
|