Lighthouse has a new layout. Prefer the old one? Return to the old layout, and switch back any time from the link at the top of each page.

This project is archived and is in readonly mode.

Changeset [1f06652a57e727700c3a673dc1f86e3b1e07ce1f] by David Chelimsky

Revision 1f06652a57e727700c3a673dc1f86e3b1e07ce1f, committed by David Chelimsky · November 9th, 2010 @ 03:54 PM

use persisted? instead of new_record? wherever possible

  • persisted? is the API defined in ActiveModel
  • makes it easier for extension libraries to conform to ActiveModel APIs without concern for whether the extended object is specifically ActiveRecord

[#5927 state:committed]

Signed-off-by: Santiago Pastorino santiago@wyeworks.com
https://github.com/rails/rails/commit/1f06652a57e727700c3a673dc1f86...

35 changed files

  • M activerecord/lib/active_record/aggregations.rb
  • M activerecord/lib/active_record/associations.rb
  • M activerecord/lib/active_record/associations/association_collection.rb
  • M activerecord/lib/active_record/associations/association_proxy.rb
  • M activerecord/lib/active_record/associations/belongs_to_association.rb
  • M activerecord/lib/active_record/associations/has_and_belongs_to_many_association.rb
  • M activerecord/lib/active_record/associations/has_many_through_association.rb
  • M activerecord/lib/active_record/associations/has_one_association.rb
  • M activerecord/lib/active_record/associations/has_one_through_association.rb
  • M activerecord/lib/active_record/attribute_methods/primary_key.rb
  • M activerecord/lib/active_record/autosave_association.rb
  • M activerecord/lib/active_record/base.rb
  • M activerecord/lib/active_record/locking/optimistic.rb
  • M activerecord/lib/active_record/locking/pessimistic.rb
  • M activerecord/lib/active_record/persistence.rb
  • M activerecord/lib/active_record/session_store.rb
  • M activerecord/lib/active_record/transactions.rb
  • M activerecord/lib/active_record/validations.rb
  • M activerecord/lib/active_record/validations/uniqueness.rb
  • M activerecord/test/cases/associations/belongs_to_associations_test.rb
  • M activerecord/test/cases/associations/has_and_belongs_to_many_associations_test.rb
  • M activerecord/test/cases/associations/has_many_associations_test.rb
  • M activerecord/test/cases/associations/has_one_associations_test.rb
  • M activerecord/test/cases/associations/join_model_test.rb
  • M activerecord/test/cases/autosave_association_test.rb
  • M activerecord/test/cases/base_test.rb
  • M activerecord/test/cases/finder_test.rb
  • M activerecord/test/cases/nested_attributes_test.rb
  • M activerecord/test/cases/relations_test.rb
  • M activerecord/test/cases/session_store/sql_bypass.rb
  • M activerecord/test/cases/transactions_test.rb
  • M activerecord/test/models/eye.rb
  • M activerecord/test/models/pirate.rb
  • M activerecord/test/models/subject.rb
  • M activerecord/test/models/topic.rb