Commit Graph

16 Commits

Author SHA1 Message Date
Sean Griffin
8019ca7a0f Update test data which doesn't reflect expected usage
Topics call `serialize :content`, which means that the values in the
database should be YAML encoded, and we would only expect to receive
YAML strings to `update_column` and `update_columns`.
2014-06-12 15:33:25 -06:00
Jason Meller
cafe31a078 Ensure #second acts like #first AR finder
This commit bring the famous ordinal Array instance methods defined
in ActiveSupport into ActiveRecord as fully-fledged finders.

These finders ensure a default ascending order of the table's primary
key, and utilize the OFFSET SQL verb to locate the user's desired
record. If an offset is defined in the query, calling #second adds
to the offset to get the actual desired record.

Fixes #13743.
2014-01-20 16:58:18 -05:00
Ari Pollak
53ca22f2e1 Fix occasional microsecond conversion inaccuracy
ActiveRecord::ConnectionAdapters::Column#microseconds did an unnecessary
conversion to from Rational to float when calculating the integer number
of microseconds. Some terminating decimal numbers in base10 are
repeating decimal numbers in base2 (the format of float), and
occasionally this causes a rounding error.
Patch & explanation originally from Logan Bowers.
2012-08-15 13:21:57 -04:00
Santiago Pastorino
a2513aea07 Test for concatenated orders added
[#4972]

Signed-off-by: José Valim <jose.valim@gmail.com>
2010-06-26 00:59:11 +02:00
Rick Olson
081ddb6f24 Merge the has_finder gem, renamed as 'named_scope'. Closes #11404 [nkallen]
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@9084 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2008-03-24 02:50:02 +00:00
Jeremy Kemper
c4233a0eae PostgreSQL: correctly quote microseconds in timestamps. Closes #5641.
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@4579 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2006-07-07 17:40:22 +00:00
Jeremy Kemper
42775686d2 PostgreSQL: support microsecond time resolution. Closes #5492.
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@4494 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2006-06-25 18:04:06 +00:00
Jeremy Kemper
48052d70ec to_xml fixes, features, and speedup. Closes #4989.
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@4413 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2006-06-03 00:01:08 +00:00
David Heinemeier Hansson
4f00c70580 Fixed eager loading problems with single-table inheritance [Rick Olson] Added smarter table aliasing for eager associations for multiple self joins [Rick Olson] (closes #3580)
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@3776 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2006-03-05 18:43:56 +00:00
Michael Koziarski
656fb866f9 Quote booleans according the rules defined by the adapter
* SQLite schema has been updated
* Postgresql schema needs to be fixed too
Simplify AR::Base#toggle to store the boolean, not the quoted value
* expand the tests


git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@2474 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2005-10-06 04:15:14 +00:00
David Heinemeier Hansson
4b53e26ef6 Fix fixture problem for pgsql
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@2178 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2005-09-11 04:18:07 +00:00
David Heinemeier Hansson
4ce69d79b7 Fix test case for MySQL #598
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@619 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2005-02-15 02:06:52 +00:00
David Heinemeier Hansson
336c2cbb8f Added an Oracle adapter that works with the Oracle bindings by Yoshida (http://raa.ruby-lang.org/project/oracle/) #564 [Maik Schmidt]
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@522 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2005-02-07 14:06:00 +00:00
David Heinemeier Hansson
612bb73fec Fixed a YAML fixture on time coming out as an integer #415 [Dan Peterson]
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@322 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2005-01-02 23:31:13 +00:00
David Heinemeier Hansson
959f362ac4 Added find_all style to the new dynamic finders
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@308 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2005-01-02 13:51:00 +00:00
David Heinemeier Hansson
daf3e92a31 Added a db2 adapter that only depends on the Ruby/DB2 bindings (http://raa.ruby-lang.org/project/ruby-db2/) #386 [Maik Schmidt]. Converted all the fixtures to YAML style ones.
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@303 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2005-01-01 19:22:16 +00:00