Jon Leighton
fab664a8e9
Fix another race condition.
...
From 2c667f69aa2daac5ee6c29ca9679616e2a71532a.
Thanks @pwnall for the heads-up.
Conflicts:
activerecord/lib/active_record/core.rb
2012-01-20 18:31:41 +00:00
David Heinemeier Hansson
f36dcaf488
Preparing for 3.2.0 release
2012-01-20 17:44:32 +01:00
Aaron Patterson
4c5b73fef8
Merge pull request #4531 from exviva/pessimistic_with_lock
...
Add ActiveRecord::Base#with_lock
2012-01-19 09:39:20 -08:00
Vijay Dev
c8b584f576
select doesn't take multiple arguments - fixes #4539 [ci skip]
...
Didn't cherry pick the master commit because this one already had some
of the fixes made in master.
2012-01-19 21:58:19 +05:30
Aaron Patterson
57f73a6bcf
Merge pull request #4487 from sarenji/fix-reset-counters
...
Fix bug where reset_counters resets the wrong counter cache.
2012-01-17 10:23:56 -08:00
Jon Leighton
70b762d1a7
Fix race condition 💣
2012-01-13 22:58:26 +00:00
Piotr Sarnacki
0d1df723c7
Fix table_name in ActiveRecord with more than one abstract ancestors
...
When subclassing abstract_class table_name should be always computed
based on class name, no matter if superclass is subclassing base
or another abstract_class. So:
class FirstAbstract < ActiveRecord::Base
self.abstract_class = true
end
class SecondAbstract < FirstAbstract
self.abstract_class = true
end
class Post < SecondAbstract
self.table_name #=> 'posts' (not 'second_abstracts')
end
2012-01-12 20:53:01 +01:00
Aaron Patterson
1d74af6688
moving to arel 3.0.0
2012-01-12 11:39:35 -08:00
Vijay Dev
e6b59432ea
fixes in api docs
2012-01-13 00:42:33 +05:30
Santiago Pastorino
3f16f5b7a0
Add CHANGELOG entry
2012-01-11 23:52:41 -02:00
Santiago Pastorino
fc74a51c3f
on and ON are type casted to a true boolean column
2012-01-11 23:26:32 -02:00
Matt Jones
d0915ac2f9
add documentation explaining reorder behavior
2012-01-11 20:24:22 +05:30
Santiago Pastorino
bb78804a5e
Merge pull request #4408 from tomstuart/read-and-write-attribute-aliases
...
#[] and #[]= are no longer interchangeable with #read_attribute and #write_attribute
2012-01-11 12:10:59 -02:00
Aaron Patterson
77785c7806
FFFFFFFFUUUUUUUUUUUUUUUUUUUUUUUUU 💣
2012-01-10 13:24:15 -08:00
Aaron Patterson
5e04884bce
deprecate the subdirectories parameter to migrations
...
Conflicts:
activerecord/lib/active_record/migration.rb
2012-01-10 13:19:11 -08:00
Santiago Pastorino
d268ef2f65
Bump to rc2
2012-01-04 18:59:41 -02:00
Aaron Patterson
d22592a05b
Merge pull request #4282 from edgecase/order_after_reorder
...
correctly handle order calls after a reorder
2012-01-04 10:13:22 -08:00
kennyj
6012970fea
Fix GH #4285 . Remove options when we record calling creat_table
2012-01-04 14:54:38 +09:00
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
Aaron Patterson
a410a9c8f7
avoid deprecation warnings when running AR tests
2011-12-24 10:43:23 -07:00
José Valim
557014d45a
Tidy up migration types.
2011-12-24 10:52:45 +01:00
Dmitrii Samoilov
7f5b51686c
added ability to specify from cli when generating a model/migration whether particular property should be an index like this 'rails g model person name:string:index profile:string'
2011-12-24 10:52:45 +01: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
Alvaro Bautista
6b9ab88a48
serialize fails on subclass
2011-12-23 18:22:42 +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