Commit Graph

5393 Commits

Author SHA1 Message Date
Sergey Nartimov
5f09414f85 deprecate ActiveSupport::Base64
extend and define ::Base64 if needed
2012-01-03 00:57:03 +03:00
Jo Liss
d8a43e2650 Document that index names are made up of all columns, not just the first.
index_name has been using the following expression

    "index_#{table_name}_on_#{Array.wrap(options[:column]) * '_and_'}"

since at least 2006 (bc7f2315), and that's how they come out in my DB.

Please check that this is correct before merging into master, perhaps
I'm misunderstanding the section I changed.
2011-12-29 23:39:06 +05:30
Uģis Ozols
bea4f9aa3f Remove unnecessary comma. 2011-12-29 23:39:06 +05:30
Aaron Patterson
f423bdc10b Merge pull request #4216 from edgecase/master_fix_reorder_with_limited_ids
allow reorder to affect eager loading correctly
2011-12-28 17:04:23 -08:00
Xavier Noria
7a80ac0162 app code in general wants Time.current, not Time.now 2011-12-28 23:47:31 +01:00
Marcos Tapajós
7767159a15 Remove empty line. 2011-12-28 12:57:20 -02:00
Marcos Tapajós
b3490d82ba Closes #4208 2011-12-27 20:31:29 -02:00
Tsutomu Kuroda
38bc917bb5 Reconnect to the first database after db:create
Otherwise, the schema and seed will be loaded onto the
test database.
2011-12-25 13:15:32 +09:00
Jon Leighton
0a2e37975d Fix situation where id method didn't get defined causing postgres to fail 2011-12-23 21:12:37 +00:00
Jon Leighton
9d9440f686 Doh, remove debugging line 2011-12-23 18:25:30 +00:00
Jon Leighton
7bb754eaed Fix #4046. 2011-12-23 18:22:44 +00:00
Jon Leighton
96c38eca23 Fix build when IM=true 2011-12-23 12:00:37 +05:30
Jon Leighton
e46e4915ff Make ActiveRecord::Relation#pluck work with serialized attributes 2011-12-22 19:24:16 +00:00
Jon Leighton
7edade337e Make read_attribute code path accessible at the class level 2011-12-22 19:24:16 +00:00
Jakub Kuźma
2d07c60b68 added failing tests for has_many, has_one and belongs_to associations with strict mass assignment sanitizer, fixed build_record to not merge creation_attributes, removed failing nested attributes tests (that feature was broken anyway) #4051
Signed-off-by: José Valim <jose.valim@gmail.com>
2011-12-21 21:17:06 +01:00
Hendy Tanata
e149d5059b Improve doc for ActiveRecord::Base.unscoped. 2011-12-20 22:27:32 +05:30
David Heinemeier Hansson
9d6e52b55e Party like its R-C-UNO! 2011-12-19 18:34:57 -06:00
Juan M. Cuello
626c881863 Fix database tasks in test namespace.
This is mostly the same as 876bade599
that was reverted due to test failures, but now with a correction.
2011-12-19 18:20:17 -03:00
José Valim
3c1884e7dd Revert "Merge pull request #4030 from Juanmcuello/database_tasks"
This reverts commit a0edfb4d20, reversing
changes made to 4012fcff22.
2011-12-19 19:31:36 +01:00
Juan M. Cuello
876bade599 Fix database tasks in test namespace. 2011-12-19 13:52:27 -03:00
Vijay Dev
c59409b838 fix a minor typo 2011-12-19 01:31:12 +05:30
José Valim
e8d69437d4 Update activerecord/lib/active_record/railties/databases.rake 2011-12-18 20:56:59 +01:00
José Valim
81deb346af Merge pull request #4019 from kommen/rake_db_structure
Make structure.sql file configureable in db:structure:dump analog to SCHEMA in db:schema:dump
2011-12-18 11:54:11 -08:00
Dieter Komendera
a2249eee76 Rename STRUCTURE to DB_STRUCTURE, update dump task description and add simple testcase. 2011-12-18 20:43:36 +01:00
Jon Leighton
de2306f10c Merge pull request #4014 from lest/bypass-preloading-for-ids-reader
bypass preloading for ids_reader
2011-12-18 09:42:15 -08:00
Sergey Nartimov
109db5a550 bypass preloading for ids_reader
when fetching ids for a collection, bypass preloading
to avoid the unnecessary performance overhead
2011-12-18 10:59:24 +03:00
Sergey Nartimov
04cea56d89 call scope within unscoped to prevent duplication of where values 2011-12-17 14:41:17 +03:00
Xavier Noria
0065f37826 AS::Concern is not really needed for AR::Explain 2011-12-16 12:12:05 -08:00
Vijay Dev
bd84b2bb5d Merge branch 'master' of github.com:lifo/docrails 2011-12-16 23:34:00 +05:30
Dieter Komendera
aa92d3732c Make structure file configureable in db:structure:dump analog to SCHEMA in db:schema dump and clean up a bit. 2011-12-16 16:15:16 +01:00
Jon Leighton
eba581846e Fix the build on postgres. Note: we should probably actually make schema mutations bust the cache. 2011-12-16 14:51:22 +00:00
Jon Leighton
7b1eeea5bc Should clear the primary keys cache also 2011-12-16 13:52:07 +00:00
Jon Leighton
7f20bb995a Don't store defaults in the schema cache 2011-12-16 13:52:07 +00:00
Jon Leighton
dee94d8ab5 Defaults hash can go on the model 2011-12-16 13:52:07 +00:00
Jon Leighton
0b08ff7d92 Cache columns at the model level.
Allows two models to use the same table but have different primary keys.
2011-12-16 13:52:07 +00:00
José Valim
192e55c38e Do not raise an exception if an invalid route was generated automatically. 2011-12-16 10:45:59 +01:00
Jon Leighton
2b22564c4e Move DefaultScope and NamedScope under Scoping 2011-12-15 20:45:42 +00:00
Jon Leighton
17ad71e514 Let AttributeMethods do its own including etc 2011-12-15 20:45:42 +00:00
Jon Leighton
ceb33f8493 Split out most of the AR::Base code into separate modules 🍰 2011-12-15 20:45:37 +00:00
José Valim
8854bf29a3 Set up delegations also for to_a and arel branches. 2011-12-15 20:59:05 +01:00
José Valim
b17bc58c76 Move delegation reponsibilities of Relation to a module. Also precompile method missing calls for rofscale. 2011-12-15 20:47:26 +01:00
José Valim
1e8b751813 Make with_scope public so we stop using send 💣 2011-12-15 20:47:26 +01:00
José Valim
1af2a1d0f5 Improve delegate list to avoid method missing. 2011-12-15 20:01:56 +01:00
José Valim
283a087634 Clean up the cache before the request in case we are running in the reload_classes_only_on_change schema. 2011-12-15 18:48:10 +01:00
José Valim
de947c621d There isn't a column_hash. It was being invoked by method missing. 2011-12-15 17:09:48 +01:00
Jon Leighton
8dba32f125 Fix #3987. 2011-12-15 13:23:28 +00:00
Andrew Kaspick
774ff18c09 Allow nested attributes in associations to update values in it's owner object. Fixes a regression from 3.0.x 2011-12-14 20:13:03 -06:00
Jon Leighton
889e8bee82 Fix #3672 again (dependent: delete_all perf) 2011-12-14 19:20:19 +00:00
Jon Leighton
909b337da8 Don't try to autosave nested assocs. Fixes #2961. 2011-12-14 17:28:59 +00:00
Alexander
9e39dc48d6 Update activerecord/lib/active_record/reflection.rb 2011-12-14 20:53:39 +04:00