aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/test/cases/inheritance_test.rb
Commit message (Collapse)AuthorAgeFilesLines
* remove deprecated callsJon Leighton2012-04-271-2/+2
|
* find and replace deprecated keysJon Leighton2012-04-271-7/+7
|
* %s/find(:\(first\|last\|all\), \([^()]*\))/scoped(\2).\1/gcI amongst other ↵Jon Leighton2012-04-271-10/+10
| | | | things
* remove calls to find(:first), find(:last) and find(:all)Jon Leighton2012-04-261-4/+4
|
* Support establishing connection on ActiveRecord::Model.Jon Leighton2011-12-281-1/+0
| | | | | This is the 'top level' connection, inherited by any models that include ActiveRecord::Model or inherit from ActiveRecord::Base.
* Deprecate set_inheritance_column in favour of self.inheritance_column=Jon Leighton2011-11-291-2/+2
|
* please use ruby -I lib:test path/to/test.rb, or export RUBY_OPTAaron Patterson2011-06-061-1/+1
|
* Refactor Active Record test connection setup. Please see the ↵Jon Leighton2011-06-041-1/+1
| | | | 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.
* Rewrote AssociationPreload.Jon Leighton2011-02-281-1/+1
|
* just use a hash for doing association cachingAaron Patterson2011-01-071-1/+1
|
* take more advantage of arel sql compilerAaron Patterson2010-12-251-1/+1
|
* stop redifining methods on every call to set_primary_keyAaron Patterson2010-12-241-0/+4
|
* fixing dup regressionsAaron Patterson2010-11-231-1/+1
|
* type_name should check for blank because people may have messed up databasesAaron Patterson2010-09-301-0/+14
|
* Add scoping and unscoped as the syntax to replace the old with_scope and ↵José Valim2010-06-291-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | with_exclusive_scope. A few examples: * with_scope now should be scoping: Before: Comment.with_scope(:find => { :conditions => { :post_id => 1 } }) do Comment.first #=> SELECT * FROM comments WHERE post_id = 1 end After: Comment.where(:post_id => 1).scoping do Comment.first #=> SELECT * FROM comments WHERE post_id = 1 end * with_exclusive_scope now should be unscoped: class Post < ActiveRecord::Base default_scope :published => true end Post.all #=> SELECT * FROM posts WHERE published = true Before: Post.with_exclusive_scope do Post.all #=> SELECT * FROM posts end After: Post.unscoped do Post.all #=> SELECT * FROM posts end Notice you can also use unscoped without a block and it will return an anonymous scope with default_scope values: Post.unscoped.all #=> SELECT * FROM posts
* Final iteration of use better testing methodsNeeraj Singh2010-05-191-7/+7
| | | | | | [#4652 state:resolved] Signed-off-by: José Valim <jose.valim@gmail.com>
* Changed ActiveRecord::Base.store_full_sti_class to be true by default ↵David Heinemeier Hansson2010-01-031-0/+3
| | | | reflecting the previously announced Rails 3 default [DHH]
* Merge commit 'rails/master'Emilio Tagua2009-08-081-1/+2
|\ | | | | | | | | | | Conflicts: activerecord/test/cases/adapter_test.rb activerecord/test/cases/method_scoping_test.rb
| * added :order to find :all as otherwise Oracle tests were failingRaimonds Simanovskis2009-08-061-1/+2
| |
* | Merge commit 'rails/master'Emilio Tagua2009-06-301-2/+2
|\|
| * Revert "Revert "Generate proper :counter_sql from :finder_sql when there is ↵Pratik Naik2009-07-011-2/+2
| | | | | | | | | | | | | | | | | | a newline character immediately following 'SELECT' [#2118 state:resolved]"" This reverts commit 80f1f863cd0f9cba89079511282de5710a2e1832. The feature doesn't work on Postgres, so don't test it on Postgres. Also, Postgres compatibility is irrelevant to the ticket/patch in question.
| * Revert "Generate proper :counter_sql from :finder_sql when there is a ↵Yehuda Katz + Carl Lerche2009-06-221-2/+2
| | | | | | | | | | | | | | | | newline character immediately following 'SELECT' [#2118 state:resolved]" This reverts commit 4851ca9e13a4317342df02ae25b1929340523f7a. The tests do not pass for postgresql.
| * Generate proper :counter_sql from :finder_sql when there is a newline ↵Patrick Joyce2009-06-211-2/+2
| | | | | | | | | | | | character immediately following 'SELECT' [#2118 state:resolved] Signed-off-by: Pratik Naik <pratiknaik@gmail.com>
* | Calculations now use Arel to construct the query.Emilio Tagua2009-04-291-2/+2
|/ | | | Implemented other methods in AR::Base with Arel support.
* Ruby 1.9 compat: rename deprecated assert_raises to assert_raise.Jeremy Kemper2009-03-081-2/+2
| | | | [#1617 state:resolved]
* Remove SQL Server cases from tests for latest adapter work to pass rails ↵Ken Collins2008-11-191-2/+2
| | | | | | expected behavior. Signed-off-by: Michael Koziarski <michael@koziarski.com>
* fixed association preloading to use = instead of IN when there's only one recordrsl2008-09-101-1/+1
| | | | | | [#1013 state:committed] Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net>
* Fix file permissionsTarmo Tänav2008-07-311-0/+0
| | | | Signed-off-by: Joshua Peek <josh@joshpeek.com>
* Fix integer quoting issues in association preload. [#602 state:resolved]Tiago Macedo2008-07-141-0/+7
| | | | Signed-off-by: Pratik Naik <pratiknaik@gmail.com>
* Namespace Inflector, Dependencies, OrderedOptions, and TimeZone under ↵Joshua Peek2008-06-031-2/+2
| | | | ActiveSupport [#238 state:resolved]
* Add ActiveRecord::Base.sti_name that checks ↵rick2008-05-311-1/+17
| | | | ActiveRecord::Base#store_full_sti_class? and returns either the full or demodulized name. [rick] [#114 state:resolved]
* Add ActiveRecord option to store the full class name on STI's type column, ↵Rodrigo Kochenburger2008-05-131-0/+28
| | | | | | allowing one to have STI subclasses in different namespaces [#114] Signed-off-by: rick <technoweenie@gmail.com>
* Merge branch 'ar-test-cleanup' of git://git.geeksomnia.com/railsJeremy Kemper2008-01-211-3/+3
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8681 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Fix pathsJeremy Kemper2008-01-181-3/+3
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8661 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Move tests to casesJeremy Kemper2008-01-181-0/+211
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8660 5ecf4fe2-1ee6-0310-87b1-e25e094e27de