aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/lib/active_record
Commit message (Collapse)AuthorAgeFilesLines
* 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-064-56/+3
| | | | 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]
* order should always be concatenated.Neeraj Singh2010-09-051-2/+1
| | | | | | | | | | | | | | | | | | | | | | 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-031-1/+1
|
* 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-031-25/+61
| | | | | | | | | | | | | | | 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
| |
* | 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>
* | Reset default scope in Thread.current when class is unloaded [#5497 ↵Andrew White2010-09-011-0/+8
|/ | | | | | state:resolved] Signed-off-by: Xavier Noria <fxn@hashref.com>
* Make all the Relation finder methods consistentPratik Naik2010-08-311-32/+67
|
* Merge remote branch 'miloops/rails_master_fixes'Pratik Naik2010-08-311-15/+26
|\
| * Avoid calling build_where is no argument is given.Emilio Tagua2010-08-311-1/+1
| |
| * Improved conditionals usage to prevent calling methods.Emilio Tagua2010-08-311-8/+19
| |
| * Don't test conditional in iteration if it is not present just clone it.Emilio Tagua2010-08-311-9/+9
| |
* | Remove default values for Relation#limit/offset/from/create_withPratik Naik2010-08-311-4/+4
| |
* | Change relation merging to always append select, group and order valuesPratik Naik2010-08-311-7/+10
|/
* replacing superclass_delegating_accessor with class_attributeNeeraj Singh2010-08-311-6/+6
| | | | Signed-off-by: José Valim <jose.valim@gmail.com>
* Replacing superclass_delegating_accessoror with class_attribute.Neeraj Singh2010-08-311-1/+1
| | | | | | | :store_full_sti_class will have value true or false so there is no danger of mutability here. Signed-off-by: José Valim <jose.valim@gmail.com>
* Replacing superclass_delegating_accessoror with class_attribute.Neeraj Singh2010-08-311-1/+1
| | | | | | | :partial_attributes will have value true or false so there is no danger of mutability here. Signed-off-by: José Valim <jose.valim@gmail.com>
* resolves merge conflictXavier Noria2010-08-311-3/+0
|\
| * The call-seq directive has no useful effect on our documentation and is not ↵Joost Baaij2010-08-281-3/+0
| | | | | | | | | | | | | | | | | | | | | | used anywhere else. Worse still, its use breaks some rdoc, replacing method names with a curly brace. Having just one call-seq directive doesn't add anything since this is covered by regular rdoc. Having multiple might make sense, but these are already documented with examples. This partly re-reverts 60de0e56b7f57f0052d7e4f43bd2ef9e363c6a1a but does not touch the vendorized code in html-scanner.
* | PERF: Avoid two method callsSantiago Pastorino2010-08-281-1/+1
|/
* Fix em_mysql2 error in rake db:createSam Aarons2010-08-271-1/+1
| | | | Signed-off-by: José Valim <jose.valim@gmail.com>
* lifecycle should be two words, life cycleJaime Iniesta2010-08-263-4/+4
|
* Merge remote branch 'docrails/master'Xavier Noria2010-08-261-8/+6
|\
| * minor formatting fixesNeeraj Singh2010-08-251-8/+6
| |
* | Catch mysql2 access denied errors in rake db:create [#5432 state:resolved]Andrew White2010-08-251-2/+4
| | | | | | | | Signed-off-by: Xavier Noria <fxn@hashref.com>
* | use blank? instead of present?, mark SQL literals as SQL literalsAaron Patterson2010-08-251-5/+5
| | | | | | | | | | | | Conflicts: activerecord/lib/active_record/relation/query_methods.rb
* | no need to send on a public methodAaron Patterson2010-08-251-1/+1
| |
* | refactor select { is_a? } to grep()Aaron Patterson2010-08-251-1/+1
| |
* | mark SQL literals as SQL literalsAaron Patterson2010-08-251-1/+1
|/
* :nodoc:s #unscoped until its behavior is more clear, now sometimes works, ↵Xavier Noria2010-08-251-1/+1
| | | | sometimes not
* edit pass to a recent doc patchXavier Noria2010-08-251-3/+10
|
* Merge remote branch 'docrails/master'Xavier Noria2010-08-252-2/+11
|\
| * touch operationg if used along with belongs_to will also be invoked on ↵Neeraj Singh2010-08-241-2/+6
| | | | | | | | associated objects
| * unscoped does not work when chained with named_scopeNeeraj Singh2010-08-231-0/+5
| |
* | @user.touch should not fail if User does not have updated_at/updated_on column.Neeraj Singh2010-08-241-9/+11
| | | | | | | | | | | | [#5439 state:resolved] Signed-off-by: José Valim <jose.valim@gmail.com>
* | fix broken relative links [#5415 state:committed]Joost Baaij2010-08-241-1/+1
| | | | | | | | Signed-off-by: Xavier Noria <fxn@hashref.com>
* | Ensure timestamps are not generated when explicitly set to false [#5440 ↵José Valim2010-08-241-1/+1
| | | | | | | | state:resolved]
* | Master is now targeting 3.1.0.betaDavid Heinemeier Hansson2010-08-231-2/+2
| |
* | marking sql literals as sql literalsAaron Patterson2010-08-231-1/+1
| |
* | we should mark sql strings as sql literalsAaron Patterson2010-08-231-1/+1
| |