Commit Graph

6043 Commits

Author SHA1 Message Date
Rob Zolkos
89fff791fa Doc for ActiveRecord::Result empty? method 2012-05-07 21:43:05 +10:00
Mitch Crowe
f9646c8a63 SpawnMethods#merge returns the intersection when passed an array, and not the union. Update the documentation to reflect this. 2012-05-05 18:34:54 -07:00
Vijay Dev
3d9673d8f6 Merge branch 'master' of github.com:lifo/docrails 2012-05-04 17:51:15 +05:30
Vijay Dev
b24f1ce138 Merge pull request #5650 from sekrett/master
Documentation fix: Change the example for habtm association to use proc according to changelog
2012-05-04 04:57:07 -07:00
Jon Leighton
d1729b917f actually don't need to expand the aggregates at all 2012-05-04 12:50:07 +01:00
Jon Leighton
780e8939c0 #to_sym is unnecessary 2012-05-04 12:50:07 +01:00
Jon Leighton
4bd9482a1a de-globalise method 2012-05-04 12:50:07 +01:00
Jon Leighton
75a22814ef extract code from AR::Base 2012-05-04 12:50:07 +01:00
Jon Leighton
0c76a52c47 clean up implementation of dynamic methods. use method compilation etc. 2012-05-04 12:50:03 +01:00
Carlos Antonio da Silva
5d26c8f00a Fix issue with private kernel methods and collection associations. Closes #2508
Change CollectionProxy#method_missing to use scoped.public_send, to
avoid a problem described in issue #2508 when trying to use class
methods with names like "open", that clash with private kernel methods.
Also changed the dynamic matcher instantiator to send straight to
scoped, to avoid another roundtrip to method_missing.
2012-05-02 23:23:35 -03:00
Marcelo Silveira
878db1f4ef Use arel nodes instead of raw sql 2012-05-02 21:25:41 -03:00
Marcelo Silveira
2bf65caf56 Use Array#first instead of Array#[0] 2012-05-02 21:25:41 -03:00
Marcelo Silveira
1379375f93 Introducing take as a replacement to the old behavior of first 2012-05-02 21:25:40 -03:00
Marcelo Silveira
489166e114 Document last, check for primary key on default order and use quoted table and column names 2012-05-02 21:25:40 -03:00
Marcelo Silveira
07e5301e69 Made first finder consistent among database engines by adding a
default order clause (fixes #5103)
2012-05-02 21:25:24 -03:00
Edgars Beigarts
6d6907e40d Refactored remove_column 2012-05-02 10:28:12 +03:00
Edward Tsech
3305256c95 Add empty rows to improve readability. [ci skip] 2012-05-01 21:19:58 +02:00
Aaron Patterson
7d2df5fa62 Merge pull request #6089 from frodsan/delete_all_limit
delete_all raise an error if a limit is provided - fixes #4979
2012-05-01 12:12:07 -07:00
Edward Tsech
d752eabde3 Add few lines to describe how aggregation part caching works. [ci skip] 2012-05-01 20:52:41 +02:00
Aaron Patterson
b2a24a1578 Merge pull request #6092 from jsanders/issue_4001_error_typecasting_non_integer_castable
Don't type cast values that don't respond to to_i to 1
2012-05-01 10:41:45 -07:00
Hrvoje Šimić
068e8b20b5 simpler wording and explanations 2012-05-01 18:25:37 +02:00
Ben Pickles
60aee4ea0e Lowercase. 2012-05-01 16:38:35 +02:00
Vijay Dev
0c9e7b69d8 more edits [ci skip] 2012-05-01 19:18:47 +05:30
Vijay Dev
42ff22f33a Merge branch 'master' of github.com:lifo/docrails 2012-05-01 19:06:03 +05:30
Aaron Patterson
de6a067078 return value of block is returned 2012-04-30 16:14:15 -07:00
Aaron Patterson
f0182d5cb9 only yield to finder block if something is found 2012-04-30 16:14:15 -07:00
Andrew White
838101ae04 Fix PR #6091
1. ActiveRecord::Base is not ActiveRecord::Relation
2. The order of records from an SQL query is uncertain without an ORDER clause
3. Run your own tests when submitting a pull request
2012-04-30 22:18:35 +01:00
James Sanders & Jason Noble
13823a4cf3 Don't type cast values that don't respond to to_i to 1 2012-04-30 11:37:31 -06:00
twinturbo
93076168c4 Add ActiveRecord::Base#ids 2012-04-30 09:45:00 -07:00
Francesco Rodriguez
2f681254ee delete_all raise an error if a limit is provided - fixes #4979 2012-04-30 10:49:20 -05:00
Hrvoje Šimić
620cc9af11 add ActiveRecord::RecordInvalid to exceptions
sort the exception names alphabetically
2012-04-30 14:46:30 +02:00
Jeremy Kemper
363d7ee551 Merge pull request #6074 from mark-rushakoff/unused-variables
Remove some unused variable assignments
2012-04-29 21:27:09 -07:00
Mark Rushakoff
d56f5c8db7 Remove unused assignments 2012-04-29 11:03:11 -07:00
Jeremy Friesen
c809c47837 Removed extraneous .present? check for AR::Base#reload 2012-04-29 13:33:54 -04:00
Jeremy Friesen
d3ccdf6505 Removed deprecation warning for #find as a result of AR::Base#reload
Cleaned up "DEPRECATION WARNING: Passing options to #find is
deprecated. Please build a scope and then call #find on it."
2012-04-29 13:10:43 -04:00
Mark Rushakoff
c13d36c95f More using <tt>x</tt> instead of +x+ when the latter renders improperly. 2012-04-27 21:33:56 -07:00
Aaron Patterson
8de4d71f5d Merge pull request #5698 from dougcole/support_postgresql_partitioning
Support postgresql partitioning by making INSERT RETURNING optional
2012-04-27 08:50:07 -07:00
José Valim
0a8aec2c97 Revert "Merge pull request #5995 from kennyj/fix_5847-3"
Active Record should be lazy loaded and this pull request
forced Active Record to always be loaded after initialization.

This reverts commit 8cd14c0bc9f9429f03d1181912355d2f48b98157, reversing
changes made to 2f0c8c52e66f1a2a3d1c00efc207f227124e96c2.
2012-04-27 15:00:56 +02:00
Jon Leighton
61555a0df1 allow AssociationProxy#scoped to take options so that API is the same as Base#scoped 2012-04-27 11:52:34 +01:00
Jon Leighton
df6f971e3a %s/find(:\(first\|last\|all\), \([^()]*\))/scoped(\2).\1/gcI amongst other things 2012-04-27 11:42:50 +01:00
Andrey Deryabin
d42b60a411 fix tests for SQLite3Adapter 2012-04-27 13:31:37 +07:00
Andrey Deryabin
dd05a49a4a renamed class SQLiteColumn to SQLite3Column 2012-04-27 13:29:58 +07:00
Andrey Deryabin
3cc9b5f196 removed tail of old sqlite versions 2012-04-27 13:23:39 +07:00
Andrey Deryabin
1a3d4f75ce fix SQLite3Adapter doc 2012-04-27 13:19:44 +07:00
Andrey Deryabin
fc1bf36a3a Upgrade sqlite3 version to 1.3.6 2012-04-27 13:14:22 +07:00
Andrey Deryabin
7572efc827 merged sqlite and sqlite3 adapters 2012-04-27 13:08:55 +07:00
Andrey Deryabin
9fd640376e EXPLAIN only for sqlite3 2012-04-26 21:53:18 +07:00
Jon Leighton
8cd14c0bc9 Merge pull request #5995 from kennyj/fix_5847-3
Fix #5847 and #4045. Load AR::Base before loading an application model.
2012-04-26 06:11:00 -07:00
Jon Leighton
2f0c8c52e6 remove deprecate #update_all usage 2012-04-26 13:29:48 +01:00
kennyj
627f89b189 Fix #5847 and #4045. Load AR::Base before loading an application model. 2012-04-26 21:21:02 +09:00