This project is archived and is in readonly mode.

Changeset [ee5ef67c443407f616feef3a8cade8ba3a9d6ef0] by Jacques Crocker

September 25th, 2010 @ 10:15 AM

Allow ActiveResource to work with non-generated ids [#5660 state:resolved]

This commit updates new? so that it knows whether or not the record was actually new or not, and doesn't rely solely on the presence of id. This enables the ability to set a custom primary_key that is not autogenerated by the server.

Signed-off-by: José Valim

Committed by Jacques Crocker

  • A activeresource/test/fixtures/address.rb
  • A activeresource/test/fixtures/subscription_plan.rb
  • M activeresource/lib/active_resource/base.rb
  • M activeresource/test/cases/base/custom_methods_test.rb
  • M activeresource/test/cases/base_test.rb

Create your profile

Help contribute to this project by taking a few moments to create your personal profile. Create your profile »

<h2 style="font-size: 14px">Tickets have moved to Github</h2>

The new ticket tracker is available at <a href=""></a>