Commit Graph

6303 Commits

Author SHA1 Message Date
Jon Leighton
bec5977932 Revert "Merge pull request #2309 from smasry/master"
This reverts commit 9d396ee819, reversing
changes made to fa2bfd832c.

Reason: the change broke the build.
2011-08-13 16:22:22 -07:00
Samer Masry
c751bb1ac2 Reverse order fix when using function for ActiveRecord::QueryMethods Fixes #1697 2011-08-13 16:22:20 -07:00
Dmitriy Kiriyenko
4c873cbf36 Fixed failing query when performing calculation with having based on select. 2011-08-13 16:22:20 -07:00
Jon Leighton
05f1a9bcc3 Add a proxy_association method to association proxies, which can be called by association extensions to access information about the association. This replaces proxy_owner etc with proxy_association.owner. 2011-08-13 16:22:20 -07:00
Vishnu Atrai
745d90bde3 remove deprication warning: ambiguous first argument; put parentheses or even spaces 2011-08-13 16:22:17 -07:00
Vishnu Atrai
5a92c6627e remove deprication warning for ruby 1.9.3-head for unused variables 2011-08-13 16:22:17 -07:00
Piotr Sarnacki
182a428418 Revert "allow select to have multiple arguments"
This reverts commit 04cc446d17.

I reverted it because apparently we want to use: select([:a, :b])
instead of select(:a, :b), but there was no tests for that form.
2011-08-13 16:22:17 -07:00
Sławosz Sławiński
e7f7439d06 allow select to have multiple arguments 2011-08-13 16:22:16 -07:00
Franck Verrot
5004aaffc1 Simplify the test by using id and name. id will be the only real sort criteria in any case as it's unique. 2011-08-13 16:22:16 -07:00
Xavier Noria
b537595665 Revert "Explicitly included hashes in sentence regarding SQL-injection-safe forms"
Reason: The hash form is secure, and preferred over the array form if possible.

This reverts commit 6dc749596c.
2011-08-13 16:22:15 -07:00
Vijay Dev
7372e9ae9a make the warning clear about the effect of using validates_associated on both sides on an association. 2011-08-13 16:22:11 -07:00
ejy
9e39fd9985 Removed trailing slash of 'Download and installation' Github URL as per convention 2011-07-28 18:40:35 +02:00
Pete Campbell
6dc749596c Explicitly included hashes in sentence regarding SQL-injection-safe forms 2011-07-28 09:44:51 -04:00
Xavier Noria
703d0e05c0 Merge branch 'master' of git://github.com/lifo/docrails 2011-07-25 14:20:01 -07:00
Glenn Gillen
4605b5639d Simplify the way default DATABASE_URL works. 2011-07-25 09:08:08 -07:00
Santiago Pastorino
64affc9384 Merge pull request #2236 from cldwalker/after_initialize
Fix after_initialize and Base.create edge case
2011-07-25 07:20:38 -07:00
thedarkone
10863580aa Bring back the ability to provide :order for update_all. 2011-07-25 13:33:44 +02:00
Aaron Patterson
02691d3516 Merge pull request #2238 from cesario/order-with-extra-spaces
Ordering with extra spaces was raising a SQL exception
2011-07-24 14:40:15 -07:00
John
dd8a485170 Fixed Typo 2011-07-24 17:11:29 -04:00
Gabriel Horner
f5e4d13270 use existing model for testing Base.create with #after_initialize 2011-07-24 16:36:06 -04:00
Xavier Noria
4bb0a8bcbd Merge branch 'master' of git://github.com/lifo/docrails 2011-07-24 21:02:51 +02:00
Oemuer Oezkir
71d18ce48e Changed a few instances of of words in the API docs written in British English to
American English(according to Weber)
2011-07-24 10:21:42 +00:00
Franck Verrot
77bb0b79f2 Ordering with extra spaces was raising a SQL exception 2011-07-24 08:18:04 +02:00
Gabriel Horner
6e3c0a5d9a simplify and be more explicit about create and after_initialize tests 2011-07-24 00:31:37 -04:00
Les Fletcher
f956759f8a fix after_initialize edge case (close #2074 and close #2175)
fix behavior when after_initialize is defined and a block is passed to Base.create
2011-07-24 00:31:28 -04:00
Aaron Patterson
a14f4566dd Merge pull request #2185 from castlerock/lazy_load_abstract_adapter
lazy load ConnectionAdapters remove require.
2011-07-23 20:51:43 -07:00
Xavier Noria
2115068476 registers the recent change to date multiparameter handling in the CHANGELOG 2011-07-23 20:31:41 +02:00
Xavier Noria
a62f450661 Merge pull request #2086 from amatsuda/date_multiparameter_nil
convert multiple Date parameters into a nil if any of its bits were blank
2011-07-23 11:20:12 -07:00
Santiago Pastorino
7dadb6aa0a Merge pull request #2171 from arunagw/database-rake-1.9.2
This conditions is required to work with database create task. 1.9.2 is h
2011-07-23 07:58:59 -07:00
Xavier Noria
ace3723d2f Merge branch 'master' of git://github.com/lifo/docrails 2011-07-23 12:15:41 +02:00
Xavier Noria
94978b9a46 Merge pull request #2188 from vijaydev/patch-6
Fixes typo
2011-07-22 10:06:35 -07:00
Aaron Patterson
253b472838 forgot to add this test case 2011-07-22 09:12:32 -07:00
Vijay Dev
a2778861fe Fixes typo 2011-07-22 08:41:00 -07:00
Vishnu Atrai
1efd88283e lazy load ConnectionAdapters remove require. 2011-07-22 17:49:24 +05:30
Aaron Patterson
b744c8493b adding changelog entry for connection urls 2011-07-21 13:09:42 -07:00
Aaron Patterson
1a0b7ea3c9 adding more tests around database uri parsing 2011-07-21 12:57:05 -07:00
Aaron Patterson
f4ed975125 move around tests 2011-07-21 11:54:29 -07:00
Arun Agrawal
fbf4bee6ed This conditions is required to work with database create task. 1.9.2 is having a bug with "Calling return within begin still executes else". 2011-07-21 09:47:42 +05:30
Terence Lee
16921437a1 fix postgres connection url test 2011-07-20 16:23:31 -07:00
Glenn Gillen
1f427b5341 Add documentation for URL connection strings. 2011-07-20 16:23:31 -07:00
Glenn Gillen
16249feaab Added test for postgres connections as URL. Fixed query param parsing. 2011-07-20 16:23:31 -07:00
Glenn Gillen
89357c8f83 Provide database connection settings as a URL. 2011-07-20 16:23:31 -07:00
Aaron Patterson
22e47279bc no need to sort the values 2011-07-20 15:52:53 -07:00
Franck Verrot
8bc314b3b7 assign_nested_attributes_for_collection_association should work with Ruby 1.9 [Closes #2106]
Children attributes can be either String's or Symbol's, so let's check if the object responds to to_i.
2011-07-20 15:40:01 -07:00
Aaron Patterson
d8736b266b Revert "this fixes a brittle test in fixtures_test.rb which fails when you are in a timezone which is ahead of UTC but UTC is in the previous day still."
This reverts commit f92cefa95f.
2011-07-20 15:37:52 -07:00
Aaron Patterson
09a488456a bigdecimal should be typecast to a float on sqlite3. fixes #2162 2011-07-20 14:39:01 -07:00
Josh Kalderimis
f92cefa95f this fixes a brittle test in fixtures_test.rb which fails when you are in a timezone which is ahead of UTC but UTC is in the previous day still. 2011-07-20 01:00:35 +02:00
Vijay Dev
02cbaf0593 avoid Symbol#to_proc 2011-07-20 00:28:51 +05:30
Norman Clarke
9db2d10b11 Explicitly require Active Support dependencies
This fixes errors when using Active Record outside of Rails. In Rails,
these files are required by other classes that are always loaded, so
this error does not happen.

Without core_ext/module/delegation, a NoMethodError is raised because
`delegate` remains undefined.

Without core_ext/class/attribute_acessors, an ArgumentError is raised because
`delegate` does not receive a value for its :to option.
2011-07-19 09:56:02 -03:00
Elliot Winkler
0e1d617b8b ActiveRecord: Fix eager loading so that giving a blank order clause generates valid SQL 2011-07-18 14:56:37 -06:00