File tree Expand file tree Collapse file tree 1 file changed +5
-5
lines changed Expand file tree Collapse file tree 1 file changed +5
-5
lines changed Original file line number Diff line number Diff line change @@ -68,11 +68,11 @@ def cache_if!(condition, *args)
68
68
condition ? cache! ( *args , &::Proc . new ) : yield
69
69
end
70
70
71
- def array! ( collection = [ ] , *attributes )
72
- options = attributes . extract_options!
71
+ def array! ( collection = [ ] , *args )
72
+ options = args . first
73
73
74
- if options . key? ( :partial )
75
- partial! options [ :partial ] , options . merge ( collection : collection )
74
+ if args . one? && _partial_options? ( options )
75
+ partial! options . merge ( collection : collection )
76
76
else
77
77
super
78
78
end
@@ -81,7 +81,7 @@ def array!(collection = [], *attributes)
81
81
def set! ( name , object = BLANK , *args )
82
82
options = args . first
83
83
84
- return super unless _partial_options? ( options )
84
+ return super unless args . one? && _partial_options? ( options )
85
85
86
86
value = if object . nil?
87
87
[ ]
You can’t perform that action at this time.
0 commit comments