| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
| |
the join record is automatically saved too. This requires the :inverse_of option to be set on the source association in the join model. See the CHANGELOG for details. [#4329 state:resolved]
|
|
|
|
| |
... } rather than instance_eval-ing strings
|
|
|
|
| |
historical and practical reasons, :delete_all is the default deletion strategy employed by association.delete(*records), despite the fact that the default strategy is :nullify for regular has_many. Also, this only works at all if the source reflection is a belongs_to. For other situations, you should directly modify the through association.
|
|
|
|
| |
records in the join table. This is to make the destroy method more consistent across the different types of associations. For more details see the CHANGELOG entry.
|
| |
|
|
|
|
| |
has_one and belongs_to
|
|
|
|
| |
table. This has been documented as deprecated behaviour since April 2006. Please use has_many :through instead. A deprecation warning will be added to the 3-0-stable branch for the 3.0.4 release.
|
| |
|
| |
|
|
|
|
| |
a replacement
|
|
|
|
| |
that up to the programmer
|
|
|
|
| |
with new compiled gem)
|
|
|
|
| |
ActiveModel::SecurePassword) to encapsulate dead-simple password usage with SHA2 encryption and salting
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
| |
This way parent models can get their own after_create and
after_update callbacks fired after has_one has done its job.
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
|
|
|
| |
Signed-off-by: José Valim <jose.valim@gmail.com>
|
|
|
|
| |
Signed-off-by: José Valim <jose.valim@gmail.com>
|
|
|
|
|
|
| |
[#4895 state:resolved]
Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net>
|
|
|
|
|
|
|
|
| |
tests to use new style API with an :on options instead of on_* suffix." and "Add after_commit and after_rollback callbacks to ActiveRecord that are called after transactions either commit or rollback on all records saved or destroyed in the transaction.""
This reverts commit 1b2941cba1165b0721f57524645fe378bee2a950.
[#2991]
|
|
|
|
|
|
| |
state:resolved]
Signed-off-by: David Heinemeier Hansson <david@loudthinking.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
use new style API with an :on options instead of on_* suffix." and "Add after_commit and after_rollback callbacks to ActiveRecord that are called after transactions either commit or rollback on all records saved or destroyed in the transaction."
This reverts commits d2a49e4b1f30c5997e169110eed94a55aee53f56 and da840d13da865331297d5287391231b1ed39721b.
[#2991]
Conflicts:
activerecord/CHANGELOG
activerecord/lib/active_record/transactions.rb
activerecord/test/cases/transaction_callbacks_test.rb
|
| |
|
|
|
|
| |
This reverts commit 6626833db13a69786f9f6cd56b9f53c4017c3e39.
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This commit breaks dumping a few tables, as the sessions table.
To reproduce, just create a new application and:
rake db:sessions:create
rake db:migrate
rake db:test:prepare
And then look at the db/schema.rb file (ht: Sam Ruby).
This reverts commit 5b95730edc33ee97f53da26a3868eb983305a771.
|
|
|
|
|
|
|
|
|
|
|
|
| |
Example:
add_index(:accounts, :name, :name => 'by_name', :length => 10)
=> CREATE INDEX by_name ON accounts(name(10))
add_index(:accounts, [:name, :surname], :name => 'by_name_surname', :length => {:name => 10, :surname => 15})
=> CREATE INDEX by_name_surname ON accounts(name(10), surname(15))
Signed-off-by: Pratik Naik <pratiknaik@gmail.com>
|
|
|
|
|
|
| |
and a hash [#4457 state:committed]
Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net>
|
|
|
|
|
|
|
|
| |
called after transactions either commit or rollback on all records saved or destroyed in the transaction.
[#2991 state:committed]
Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net>
|
|
|
|
|
|
| |
both Hash and Array depends on.
Also, refactored ActiveModel serializers to just use ActiveSupport::XmlMini.to_tag. As consequence, if a serialized attribute is an array or a hash, it's not encoded as yaml, but as a hash or array.
|
|
|
|
|
|
|
|
|
|
| |
Now works with :dependent => :destroy and includes unit tests for that
case. Also includes better error messages when updating/deleting stale
objects.
[#1966 state:committed]
Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net>
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Instead of using a single `notify_observers` call for every callback type,
each observer now registers a unique callback for itself. Example:
before_save :_notify_user_observer_for_before_save
def _notify_user_observer_for_before_save
observer.update(:before_save, self)
end
Benefit: "before" callbacks halt when `observer.update` returns false.
This way, ActiveRecord observers can prevent records from saving.
[#4087 state:committed]
Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net>
|