aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord
Commit message (Collapse)AuthorAgeFilesLines
...
* Refactor finder conditions look up and assigment for apply_finder_conditions.Emilio Tagua2010-09-091-13/+7
|
* Refactor Relation#only. No need to go through every option and test it.Emilio Tagua2010-09-091-8/+6
|
* Add tests for Relation#only.Emilio Tagua2010-09-091-0/+11
|
* No need to go through every option and test it, just don't add skipped ones.Emilio Tagua2010-09-091-4/+4
|
* return is not needed hereNeeraj Singh2010-09-091-2/+2
|
* remove unnecessary callNeeraj Singh2010-09-091-1/+0
| | | | if operation is count then column_name will never be blank
* creating a new array is required. who knew? :-(Aaron Patterson2010-09-091-1/+1
|
* no need for Array.wrap, also avoid array creationAaron Patterson2010-09-091-5/+4
|
* make apply_modules run fasterNeeraj Singh2010-09-091-3/+5
|
* eliminate present? for fewer method callsAaron Patterson2010-09-081-10/+2
|
* returning arrays lets us avoid Array.wrapAaron Patterson2010-09-081-4/+4
|
* removing unnecessary conditional testAaron Patterson2010-09-081-4/+4
|
* switch to blank? to avoid method callsAaron Patterson2010-09-081-6/+6
|
* refactor to use faster empty?Aaron Patterson2010-09-081-1/+3
|
* drying up joins()Aaron Patterson2010-09-081-4/+2
|
* reduce method calls, use reject + blank? instead of select + present?Aaron Patterson2010-09-081-3/+3
|
* refactor a couple injects to map + Hash[]Aaron Patterson2010-09-081-5/+2
|
* avoid an inject in favor of dupAaron Patterson2010-09-081-3/+3
|
* attributes should be constructed with table objectsAaron Patterson2010-09-071-1/+1
|
* attributes should be associated with tablesAaron Patterson2010-09-071-1/+1
|
* serialized attributes should be serialized before validation [#5525 ↵Aaron Patterson2010-09-073-3/+12
| | | | state:resolved]
* no need to freeze this stringAaron Patterson2010-09-071-1/+1
|
* fixed some issues with JSON encodingJakub Suder2010-09-073-2/+11
| | | | | | | | | | | - as_json in ActiveModel should return a hash and handle :only/:except/:methods options - Array and Hash should call as_json on their elements - json methods should not modify options argument [#5374 state:committed] Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net>
* removing useless code, cleaning variable namesAaron Patterson2010-09-071-6/+2
|
* select should raise error when no block or no parameter is passedAaron Patterson2010-09-072-3/+7
|
* select does not need a *argsAaron Patterson2010-09-071-2/+2
|
* unscoped has nothing so merging with a relation just returns the relationSantiago Pastorino2010-09-071-1/+1
|
* cleaning up confusing logicAaron Patterson2010-09-061-3/+6
|
* Use railties:copy_migrations instead of db:copy_migrationsPiotr Sarnacki2010-09-061-1/+5
| | | | Signed-off-by: José Valim <jose.valim@gmail.com>
* Refactor AR validations a bitCarlos Antonio da Silva2010-09-061-5/+1
| | | | Signed-off-by: José Valim <jose.valim@gmail.com>
* Cleanup deprecation warnings in active recordCarlos Antonio da Silva2010-09-067-112/+11
| | | | Signed-off-by: José Valim <jose.valim@gmail.com>
* Improved indentationPratik Naik2010-09-061-7/+3
|
* Use scoped here to get the scoped whereSantiago Pastorino2010-09-051-5/+3
|
* Make scoped reorder override previous applied ordersSantiago Pastorino2010-09-052-3/+15
| | | | [5528 state:committed]
* failing test for reorder overriding default_scopeNick Ragaz2010-09-052-1/+7
| | | | | | [5528] Signed-off-by: Santiago Pastorino <santiago@wyeworks.com>
* order should always be concatenated.Neeraj Singh2010-09-056-8/+35
| | | | | | | | | | | | | | | | | | | | | | 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>
* Fix copying migrations to empty directoryPiotr Sarnacki2010-09-033-1/+15
|
* rake db:copy_migrations task, which copies railties migrations into ↵Piotr Sarnacki2010-09-031-0/+22
| | | | application's db/migrate directory
* Implemented ActiveRecord::Migrations#copy based on James Adam's ideaPiotr Sarnacki2010-09-0311-25/+265
| | | | | | | | | | | | | | | ActiveRecord::Migration#copy allows to copy migrations from one place to another, changing migrations versions and adding scope to filename. For example: ActiveRecord::Migration.copy("db/migrate", :blog_engine => "vendor/gems/blog/db/migrate") will copy all migrations from vendor/gems/blog/db/migrate to db/migrate with such format: Versions of copied migrations will be reversioned to be appended after migrations that already exists in db/migrate
* Added Rails.application.config.paths.db.migrate to remove hardcoded ↵Piotr Sarnacki2010-09-032-10/+13
| | | | db/migrate paths
* Merge remote branch 'docrails/master'Xavier Noria2010-09-035-23/+23
|\
| * Use new finders syntax in docs.Emilio Tagua2010-09-015-23/+23
| |
* | A few schema changes for the SQL Server adapter.Ken Collins2010-09-031-3/+3
| | | | | | | | Signed-off-by: Michael Koziarski <michael@koziarski.com>
* | Revert "Setup explicit requires for files with exceptions. Removed them from ↵José Valim2010-09-024-5/+0
| | | | | | | | | | | | | | | | autoloading." Booting a new Rails application does not work after this commit [#5359 state:open] This reverts commit 38a421b34d0b414564e919f67d339fac067a56e6.
* | Setup explicit requires for files with exceptions. Removed them from ↵Łukasz Strzałkowski2010-09-024-0/+5
| | | | | | | | | | | | autoloading. Signed-off-by: José Valim <jose.valim@gmail.com>
* | remove use of echo [#4410 state:resolved]Greg Hazel2010-09-021-2/+2
| | | | | | | | Signed-off-by: José Valim <jose.valim@gmail.com>
* | Reset default scope in Thread.current when class is unloaded [#5497 ↵Andrew White2010-09-012-0/+23
| | | | | | | | | | | | state:resolved] Signed-off-by: Xavier Noria <fxn@hashref.com>
* | Fix test: this should return 0 not 7, since Arel was ignoring select clause ↵Emilio Tagua2010-09-011-1/+1
| | | | | | | | | | | | and now it's fixed. Signed-off-by: José Valim <jose.valim@gmail.com>
* | split out active_record migration logic so others can easily reuse [#5389 ↵Jack Dempsey2010-09-012-10/+17
| | | | | | | | | | | | state:resolved] Signed-off-by: José Valim <jose.valim@gmail.com>
* | nested attributes tests should rely on associated objects to verify results ↵Subba Rao Pasupuleti2010-09-011-57/+64
|/ | | | | | not on assert_difference [#5206 state:resolved] Signed-off-by: José Valim <jose.valim@gmail.com>