Commit Graph

18 Commits

Author SHA1 Message Date
Guillermo Iguaran
8aebe30ef4 Revert "Merge pull request #8989 from robertomiranda/use-rails-4-find-by"
This reverts commit 637a7d9d357a0f3f725b0548282ca8c5e7d4af4a, reversing
changes made to 5937bd02dee112646469848d7fe8a8bfcef5b4c1.
2013-01-18 09:15:19 -05:00
robertomiranda
7baecc4802 User Rails 4 find_by 2013-01-18 07:56:05 -05:00
John Foley
d66d6076b2 Fix collisions with before and after validation callbacks.
This commit allows a user to do something like:
    before_validation :do_stuff, :on => [ :create, :update ]
    after_validation :do_more, :on => [ :create, :update ]
2012-09-23 12:53:50 -06:00
Marc-Andre Lafortune
4faaa81161 + ActiveRecord::Base#destroy! 2012-06-06 13:27:51 -04:00
Jon Leighton
0b72a04d0c Deprecate set_table_name in favour of self.table_name= or defining your own method. 2011-11-29 20:13:36 +00:00
Aaron Patterson
61774e0d49 please use ruby -I lib:test path/to/test.rb, or export RUBY_OPT 2011-06-06 15:47:13 -07:00
Jon Leighton
253bb6b926 Refactor Active Record test connection setup. Please see the RUNNING_UNIT_TESTS file for details, but essentially you can now configure things in test/config.yml. You can also run tests directly via the command line, e.g. ruby path/to/test.rb (no rake needed, uses default db connection from test/config.yml). This will help us fix the CI by enabling us to isolate the different Rails versions to different databases. 2011-06-04 23:47:03 +01:00
Carlos Antonio da Silva
9b610049bb Cleanup deprecation warnings in active record
Signed-off-by: José Valim <jose.valim@gmail.com>
2010-09-06 13:39:55 +02:00
Aaron Patterson
949c7e2d0e fisting after_rollback and after commit callbacks 2010-08-20 00:06:49 -07:00
Evan Phoenix
34497c0b36 Remove test ordering bug by using another class 2010-03-22 10:00:03 -07:00
Aaron Patterson
3911a7c197 squelching more warnings in the AR tests. [#4218 state:resolved]
Signed-off-by: wycats <wycats@gmail.com>
2010-03-18 10:24:16 -07:00
José Valim
0c2d933f36 Ensure before_validation and after_validation accepts :on as option. 2010-01-06 22:24:16 +01:00
José Valim
2ea1d684d9 Refactor new callbacks and AR implementation.
Signed-off-by: Joshua Peek <josh@joshpeek.com>
2009-09-08 10:26:39 -05:00
José Valim
4f37b97033 Changed ActiveRecord to use new callbacks and speed up observers by only notifying events that are actually being consumed.
Signed-off-by: Joshua Peek <josh@joshpeek.com>
2009-09-08 10:26:39 -05:00
Jeremy Kemper
1c36172c13 Ruby 1.9 compat: rename deprecated assert_raises to assert_raise.
[#1617 state:resolved]
2009-03-08 13:11:58 -07:00
Michael Lovitt
7a0e7c7270 Fixed broken after_save callback; was being called when before_create was canceled or before_update was canceled
Signed-off-by: Michael Koziarski <michael@koziarski.com>
[#1735 state:committed]
2009-01-16 10:11:58 +13:00
Jeremy Kemper
39814fcce0 Merge branch 'ar-test-cleanup' of git://git.geeksomnia.com/rails
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8681 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2008-01-21 17:20:51 +00:00
Jeremy Kemper
42b39ae3f2 Move tests to cases
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8660 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2008-01-18 07:30:42 +00:00