File tree Expand file tree Collapse file tree 1 file changed +0
-9
lines changed
activerecord/lib/active_record/associations Expand file tree Collapse file tree 1 file changed +0
-9
lines changed Original file line number Diff line number Diff line change @@ -4,21 +4,18 @@ module Associations
4
4
class HasOneAssociation < AssociationProxy #:nodoc:
5
5
def create ( attrs = { } )
6
6
new_record do |reflection |
7
- attrs = merge_with_conditions ( attrs )
8
7
reflection . create_association ( attrs )
9
8
end
10
9
end
11
10
12
11
def create! ( attrs = { } )
13
12
new_record do |reflection |
14
- attrs = merge_with_conditions ( attrs )
15
13
reflection . create_association! ( attrs )
16
14
end
17
15
end
18
16
19
17
def build ( attrs = { } )
20
18
new_record do |reflection |
21
- attrs = merge_with_conditions ( attrs )
22
19
reflection . build_association ( attrs )
23
20
end
24
21
end
@@ -77,12 +74,6 @@ def new_record
77
74
replace ( record , true )
78
75
record
79
76
end
80
-
81
- def merge_with_conditions ( attrs = { } )
82
- attrs ||= { }
83
- attrs . update ( @reflection . options [ :conditions ] ) if @reflection . options [ :conditions ] . is_a? ( Hash )
84
- attrs
85
- end
86
77
end
87
78
end
88
79
end
You can’t perform that action at this time.
0 commit comments