Skip to content

Commit

Permalink
Enable partial updates by default
Browse files Browse the repository at this point in the history
  • Loading branch information
jeremy committed May 30, 2008
1 parent 946f514 commit 2ce1be3
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion activerecord/lib/active_record/dirty.rb
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ def self.included(base)
base.alias_method_chain :reload, :dirty base.alias_method_chain :reload, :dirty


base.superclass_delegating_accessor :partial_updates base.superclass_delegating_accessor :partial_updates
base.partial_updates = false base.partial_updates = true
end end


# Do any attributes have unsaved changes? # Do any attributes have unsaved changes?
Expand Down

6 comments on commit 2ce1be3

@DefV
Copy link
Contributor

@DefV DefV commented on 2ce1be3 May 30, 2008

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This kind of makes this commit (http://github.com/rails/rails/commit/888d5059bdb71e6d034d0c09d7e3b3e235fd8507) useless..

@trevorturk
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, I’m not sure how to read this either. Are partial updates on by default now?

@geoffgarside
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Its likely that partial updates are not enabled by default for Rails 2.1, but if you stay on edge then they are enabled by default as per the commit message.

@ncr
Copy link
Contributor

@ncr ncr commented on 2ce1be3 May 31, 2008

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think it needs stronger “opinion”. I like it on by default.

@NZKoz
Copy link
Member

@NZKoz NZKoz commented on 2ce1be3 Jun 1, 2008

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It’s on by default, if you have contention-heavy data and you’re not using optimistic locking at present you’re already breaking stuff.

The discussions which resulted in this happened face to face, sorry for the confusion :)

@trevorturk
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the clarification. I think this is a good default, personally.

Please sign in to comment.