File tree Expand file tree Collapse file tree 2 files changed +0
-20
lines changed Expand file tree Collapse file tree 2 files changed +0
-20
lines changed Original file line number Diff line number Diff line change @@ -76,18 +76,5 @@ def _set_value(name, v)
76
76
def _target_class
77
77
target_type . constantize
78
78
end
79
-
80
- # Patch ActiveRecord to save serialized attributes only if they are changed
81
- if ActiveRecord ::VERSION ::MAJOR < 4
82
- # https://github.com/rails/rails/blob/3-2-stable/activerecord/lib/active_record/attribute_methods/dirty.rb#L70
83
- def update ( *)
84
- super ( changed ) if changed?
85
- end
86
- else
87
- # https://github.com/rails/rails/blob/4-0-stable/activerecord/lib/active_record/attribute_methods/dirty.rb#L73
88
- def update_record ( *)
89
- super ( keys_for_partial_write ) if changed?
90
- end
91
- end
92
79
end
93
80
end
Original file line number Diff line number Diff line change 97
97
user . settings ( :dashboard ) . update_attributes! :foo => 'bar'
98
98
} . to perform_queries ( 1 )
99
99
end
100
-
101
- it "should not touch database if there are no changes made" do
102
- expect {
103
- user . settings ( :dashboard ) . update_attributes :theme => 'pink'
104
- user . settings ( :calendar ) . update_attributes :scope => 'all'
105
- } . to perform_queries ( 0 )
106
- end
107
100
end
108
101
end
You can’t perform that action at this time.
0 commit comments