rails/activerecord/test/fixtures
Neeraj Singh 91fec0d24d order should always be concatenated.
order that is declared first has highest priority in all cases.

Here are some examples.

Car.order('name desc').find(:first, :order => 'id').name

Car.named_scope_with_order.named_scope_with_another_order

Car.order('id DESC').scoping do
  Car.find(:first, :order => 'id asc')
end

No special treatment to with_scope or scoping.

Also note that if default_scope declares an order then the order
declared in default_scope has the highest priority unless
with_exclusive_scope is used.

Signed-off-by: Santiago Pastorino <santiago@wyeworks.com>
2010-09-05 08:13:42 -03:00
..
admin Support fixtures for namespaced models [#2965 state:resolved] 2010-04-25 16:04:38 +02:00
all Added fixtures :all to test_helper.rb to assume that most people just want all their fixtures loaded all the time [DHH] Added fixtures :all as a way of loading all fixtures in the fixture directory at once (closes #7214) [manfred] 2007-02-25 17:31:43 +00:00
categories
naked
reserved_words Quote table names. Defaults to column quoting. Closes #4593. 2007-10-16 05:06:33 +00:00
.gitignore Merge branch 'ar-test-cleanup' of git://git.geeksomnia.com/rails 2008-01-21 17:20:51 +00:00
accounts.yml Fix has_one with foreign_key and primary_key association bug which caused the associated object being lost when saving the owner. [#1756 state:resolved] 2009-09-12 16:03:32 +02:00
author_addresses.yml Add missing author_addresses.yml fixture. Closes #10592. 2008-01-21 17:21:12 +00:00
author_favorites.yml add self referential has_many :through example [Rick] 2006-03-21 01:07:16 +00:00
authors.yml belongs_to supports :dependent => :destroy and :delete. Closes #10592. 2008-01-19 05:30:42 +00:00
binaries.yml fixing invalid yaml [#4424 state:resolved] 2010-04-17 00:14:23 -04:00
books.yml Fix has_many :through delete with custom foreign keys. Closes #6466. 2007-10-27 18:51:32 +00:00
cars.yml order should always be concatenated. 2010-09-05 08:13:42 -03:00
categories_ordered.yml Fixtures: fix YAML ordered map support. Closes #2665. 2007-03-09 02:06:50 +00:00
categories_posts.yml Use association's :conditions when eager loading. [jeremyevans0@gmail.com] closes #4144 2006-03-16 06:17:54 +00:00
categories.yml
categorizations.yml Allow :uniq => true with has_many :through associations. 2006-05-06 23:37:56 +00:00
clubs.yml Add has_one :through support, finally. Closes #4756 [thechrisoshow] 2008-03-21 18:09:03 +00:00
collections.yml Refactor compute_type to handle situations where the correct class is already loaded 2010-04-12 21:31:20 -07:00
comments.yml Deletes trailing whitespaces (over text files only find * -type f -exec sed 's/[ \t]*$//' -i {} \;) 2010-08-14 04:12:33 -03:00
companies.yml Deletes trailing whitespaces (over text files only find * -type f -exec sed 's/[ \t]*$//' -i {} \;) 2010-08-14 04:12:33 -03:00
computers.yml
courses.yml
customers.yml Added :constructor and :converter options to composed_of and deprecated the conversion block 2008-09-10 18:28:47 +02:00
dashboards.yml string IDs are now quoted correctly [#5064 state:resolved] 2010-07-13 08:14:52 +02:00
developers_projects.yml fix test_find_in_association_with_options test, tweak other tests affected by developer/project addition 2006-03-16 03:24:40 +00:00
developers.yml
edges.yml Revert "Revert "Assert primary key does not exist in habtm when the association is defined, instead of doing that everytime a record is inserted."" 2009-11-23 10:42:32 -08:00
entrants.yml
faces.yml Add inverse polymorphic association support. [#3520 state:resolved] 2009-12-28 15:12:13 +01:00
fk_test_has_fk.yml
fk_test_has_pk.yml
funny_jokes.yml Fixtures: correct escaping of \n and \r. Closes #5859. 2006-08-24 01:50:24 +00:00
interests.yml Add inverse polymorphic association support. [#3520 state:resolved] 2009-12-28 15:12:13 +01:00
items.yml Deletes trailing whitespaces (over text files only find * -type f -exec sed 's/[ \t]*$//' -i {} \;) 2010-08-14 04:12:33 -03:00
jobs.yml Ensure table names are quoted by the association preloading code. 2008-04-26 12:14:50 +12:00
legacy_things.yml
mateys.yml Fixed that create table with :id => false and fixtures don't play nice together (closes #10154) [jbarnette] 2007-11-25 22:08:38 +00:00
member_types.yml Fix preloading of has_one :through associations on belongs_to [#1507 state:resolved] 2008-12-18 19:19:36 +00:00
members.yml Fix preloading of has_one :through associations on belongs_to [#1507 state:resolved] 2008-12-18 19:19:36 +00:00
memberships.yml Deletes trailing whitespaces (over text files only find * -type f -exec sed 's/[ \t]*$//' -i {} \;) 2010-08-14 04:12:33 -03:00
men.yml Providing support for :inverse_of as an option to associations. 2009-05-04 15:27:39 -07:00
minimalistics.yml Missed the add 2007-10-06 01:03:19 +00:00
minivans.yml update_attribute should not update readonly attributes 2010-07-21 14:55:57 +02:00
mixed_case_monkeys.yml Consistently quote primary key column names. Closes #7763. 2007-03-09 03:23:37 +00:00
mixins.yml Deletes trailing whitespaces (over text files only find * -type f -exec sed 's/[ \t]*$//' -i {} \;) 2010-08-14 04:12:33 -03:00
movies.yml
organizations.yml Revert "Fixed bug with polymorphic has_one :as pointing to an STI record" 2009-05-11 12:20:54 -07:00
owners.yml Fixed preloading belongs_to associations which reference a custom foreign key. References #9640. 2008-01-31 07:50:15 +00:00
parrots_pirates.yml Foxy fixtures. Adapter#disable_referential_integrity. Closes #9981. 2007-10-26 05:56:46 +00:00
parrots.yml Foxy fixtures: support single-table inheritance. Closes #10234. 2007-11-26 22:46:11 +00:00
people.yml Fixed limited eager loading associations with numbers in the name [#2668 state:resolved] 2009-05-18 13:56:17 +02:00
pets.yml Fixed preloading belongs_to associations which reference a custom foreign key. References #9640. 2008-01-31 07:50:15 +00:00
pirates.yml Foxy fixtures. Adapter#disable_referential_integrity. Closes #9981. 2007-10-26 05:56:46 +00:00
posts.yml Fix that counter_cache breaks with has_many :dependent => :nullify. 2009-08-09 21:18:16 -07:00
price_estimates.yml Fix has_many :through a polymorphic has_many. Closes #10529 [Aleksey Kondratenko] 2008-02-02 03:27:31 +00:00
products.yml Refactor compute_type to handle situations where the correct class is already loaded 2010-04-12 21:31:20 -07:00
projects.yml
readers.yml Make dynamic finders respect the :include on HasManyThrough associations. Closes #10998. [cpytel] 2008-02-18 00:14:54 +00:00
references.yml Ensure table names are quoted by the association preloading code. 2008-04-26 12:14:50 +12:00
ships.yml Foxy fixtures: allow mixed usage to make migration easier and more attractive. Closes #10004. 2007-11-26 22:45:43 +00:00
speedometers.yml string IDs are now quoted correctly [#5064 state:resolved] 2010-07-13 08:14:52 +02:00
sponsors.yml Revert "Fixed bug with polymorphic has_one :as pointing to an STI record" 2009-05-11 12:20:54 -07:00
subscribers.yml Fixtures: removed support for the ancient pre-YAML file format. Closes #10736. 2008-01-08 03:54:40 +00:00
subscriptions.yml test and fix collection_singular_ids= with string primary keys [#5125 state:resolved] 2010-08-02 16:41:20 +02:00
taggings.yml Deletes trailing whitespaces (over text files only find * -type f -exec sed 's/[ \t]*$//' -i {} \;) 2010-08-14 04:12:33 -03:00
tags.yml Deletes trailing whitespaces (over text files only find * -type f -exec sed 's/[ \t]*$//' -i {} \;) 2010-08-14 04:12:33 -03:00
tasks.yml
topics.yml Test for concatenated orders added 2010-06-26 00:59:11 +02:00
toys.yml Ensure has_many :through works with changed primary keys [#736 state:resolved] 2009-03-09 13:43:28 +00:00
treasures.yml Add 'foxy' support for fixtures of polymorphic associations. Closes #10183 [jbarnette, David Lowenfels] 2007-11-20 21:53:22 +00:00
variants.yml Refactor compute_type to handle situations where the correct class is already loaded 2010-04-12 21:31:20 -07:00
vertices.yml Included associations: go deep. 2006-08-16 18:10:52 +00:00
warehouse-things.yml More thoroughly quote table names. Exposes some issues with sqlite2 adapter. Closes #10698. 2008-01-05 14:58:28 +00:00
zines.yml Providing support for :inverse_of as an option to associations. 2009-05-04 15:27:39 -07:00