Joshua Peek
9b1b88f09c
Fixed reset_session for ActiveRecord session store [ #2108 state:resolved]
2009-03-03 13:07:03 -06:00
Michael Koziarski
818556ec4f
Revert "DDL transactions and savepoints for sqlite"
...
This reverts commit 38136f86dc .
Caused several test failures on the ci box:
http://ci.rubyonrails.org/builds/rails/38136f
[#2080 state:open]
2009-03-02 19:07:39 +13:00
Jason King
38136f86dc
DDL transactions and savepoints for sqlite
...
Sqlite has had DDL transactions since 2.0.0[1] and savepoints since
3.6.8[2]. This patch updates the connection_adapters.
[1] http://tinyurl.com/sqlite-v2-0-0
[2] http://tinyurl.com/sqlite-v3-6-8
Signed-off-by: Michael Koziarski <michael@koziarski.com >
[#2080 state:committed]
2009-03-02 18:46:30 +13:00
Pratik Naik
0db6c3f518
Merge docrails and update the release notes
2009-02-28 19:44:25 +00:00
Mike Gunderloy
c653f700d3
Fix that scoped find with :group and :having [ #2006 state:resolved]
...
Signed-off-by: Pratik Naik <pratiknaik@gmail.com >
2009-02-28 17:35:58 +00:00
David Heinemeier Hansson
77b0994c78
Prep for RC2 later today
2009-02-27 14:46:23 +01:00
Zack Hobson
ff894b55dd
Update rdoc: all is not a named_scope [ #1959 state:committed]
...
Signed-off-by: David Heinemeier Hansson <david@loudthinking.com >
2009-02-27 14:43:11 +01:00
David Heinemeier Hansson
6de83562f9
Force all internal calls to Array#to_sentence to use English [ #2010 state:resolved]
2009-02-27 14:22:39 +01:00
Eloy Duran
e2b925fa68
Don't validate records of an :autosave association if they're marked for destruction. [ #2064 status:resolved]
...
Signed-off-by: David Heinemeier Hansson <david@loudthinking.com >
2009-02-27 13:57:27 +01:00
David Heinemeier Hansson
5cda000bf0
Fixed that autosave should validate associations even if master is invalid [ #1930 status:committed]
2009-02-27 13:50:24 +01:00
Diego Algorta
0dd2f96f5c
Fixed bug that makes named_scopes _forgot_ current scope
2009-02-25 09:21:08 -08:00
Joshua Peek
1b22071b27
Ensure ActiveRecord session store's connections are checked in after each request [ #1927 state:resolved]
2009-02-24 11:34:32 -06:00
Pratik Naik
53cd102b39
Merge with docrails
2009-02-24 12:29:25 +00:00
David Heinemeier Hansson
45787bdd0e
Fix docs
2009-02-23 12:20:37 +01:00
David Heinemeier Hansson
d13623ca46
Added ActiveRecord::Base.each and ActiveRecord::Base.find_in_batches for batch processing [DHH/Jamis Buck]
2009-02-23 12:11:02 +01:00
Michael Koziarski
06040849b5
Revert "Wrap calls to update_attributes in a transaction."
...
This caused failures on sqlite, sqlite3 and postgresql
This reverts commit fc09ebc669 .
[#922 state:reopened]
2009-02-22 16:41:04 +13:00
Xavier Noria
fc09ebc669
Wrap calls to update_attributes in a transaction.
...
Signed-off-by: Michael Koziarski <michael@koziarski.com >
[#922 state:committed]
2009-02-22 15:31:27 +13:00
Lance Ivy
5dbc9d40a4
Changed API of NestedAttributes to take an array, or hash with index keys, of hashes that have the id on the inside of the attributes hash and updated the FormBuilder to produce such hashes. Also fixed NestedAttributes with composite ids.
...
Signed-off-by: Michael Koziarski <michael@koziarski.com >
Signed-off-by: Eloy Duran <eloy.de.enige@gmail.com >
[#1892 state:committed]
2009-02-13 21:47:56 +13:00
Jeremy Kemper
34f34e3009
Merge branch 'master' of git@github.com:rails/rails
2009-02-05 23:05:41 -08:00
Pratik Naik
96d610553e
Merge docrails along with the new guides and guides generation code
2009-02-06 02:01:22 +00:00
Michael Koziarski
011ea46569
Don't use weird attribute_condition methods in AR Session Store
...
Use the hash condition for find instead.
2009-02-06 14:32:03 +13:00
Will Bryant
9991868d85
support end-exclusive ... Ranges in SQL hash condition sanitization properly
...
Signed-off-by: Michael Koziarski <michael@koziarski.com >
[#1865 state:committed]
2009-02-06 13:43:02 +13:00
Max Lapshin
1fe9d6cc88
Support true/false in query_attribute for calculated columns
...
Signed-off-by: Tarmo Tänav <tarmo@itech.ee >
Signed-off-by: Michael Koziarski <michael@koziarski.com >
2009-02-06 13:39:08 +13:00
Eloy Duran
db5d695016
Also save :autosave enabled associations when #save! is used.
...
Signed-off-by: Michael Koziarski <michael@koziarski.com >
[#1877 state:committed]
2009-02-06 13:38:15 +13:00
Pascal Ehlert
455a7633db
Nested attribute accessors should ignore new records with truthy _delete key.
...
Signed-off-by: Michael Koziarski <michael@koziarski.com >
[#1861 state:committed]
2009-02-06 13:36:59 +13:00
Scott Taylor
5a8f764661
Add ActiveRecord::Base.exists? with no args [ #1817 state:committed]
...
Signed-off-by: David Heinemeier Hansson <david@loudthinking.com >
2009-02-05 20:51:06 +01:00
Jeremy Kemper
6f8ed1cd3f
Migrations: make default database connection overridable
2009-02-04 12:21:22 -08:00
Pratik Naik
886124e688
Merge docrails
2009-02-01 18:25:03 +00:00
miloops
2b8be761e4
validate_length_of should use custom message if given when using in or within.
...
Signed-off-by: Michael Koziarski <michael@koziarski.com >
[#1057 state:committed]
2009-02-01 14:58:17 +13:00
Eloy Duran
ec8f045844
Add support for nested object forms to ActiveRecord and the helpers in ActionPack
...
Signed-Off-By: Michael Koziarski <michael@koziarski.com >
[#1202 state:committed]
2009-02-01 14:44:30 +13:00
Jacob Dunphy
e6493eb9b7
Sqlite adapter's copy_table incorrectly attempts to recreate a primary key id (:id => true in the create_table) if an :id column is present, even if it isn't a primary_key.
...
This fix sets :id => false if there is an :id column, but it's not the primary_key.
Signed-off-by: Michael Koziarski <michael@koziarski.com >
[#1766 state:committed]
2009-01-29 17:34:33 +13:00
Filip H.F. "FiXato" Slagter
a0d8202bb9
Ensure whitespaces are stripped when merging string joins. [ #1297 state:resolved]
...
Signed-off-by: Pratik Naik <pratiknaik@gmail.com >
2009-01-28 19:50:55 +00:00
Pratik Naik
74871961ec
Add array id support to Model.update_counters. [ #1254 state:resolved] [Carlos Júnior]
2009-01-28 19:20:55 +00:00
Dov Murik
5fe6635e05
Mysql#reconnect is set according to the 'reconnect' key in the connection spec.
...
The 'reconenct' boolean option is read from the connection specification
and is used to set the reconnect attribute of Mysql. The default is
false in order not to change existing application behaviour.
Also, reconnect is set AFTER real_connect is called, so its value sticks
(the mysql gem sets reconnect to false inside real_connect).
Signed-off-by: Michael Koziarski <michael@koziarski.com >
[#1797 state:committed]
2009-01-27 09:55:25 +13:00
Pratik Naik
fe6ffce51d
Make sure inner scope conditions get a preference over the outer ones
2009-01-24 17:54:10 +00:00
Josh Susser
ccda96093a
Minor refactoring of validates_associated to replace #inject with #collect + #all?
...
[#1686 state:committed]
2009-01-22 13:45:19 +13:00
Pratik Naik
39e1ac658e
Merge docrails
2009-01-18 18:10:58 +00:00
Pratik Naik
085991891e
Bump up the year in MIT license files
2009-01-18 05:28:21 +00:00
lukeludwig
3ee4e00918
Cache columns for has_and_belongs_to_many associations
...
This avoids repeatedly calling SHOW COLUMNS when the association is queried
[#1738 state:committed]
2009-01-17 18:09:13 +13:00
Ben VandenBos
0e92f67073
Make belongs_to :dependent => :destroy destroy self before associated object [ #1079 state:resolved]
...
If foreign key constraints are in place then deleteing the associated object first will cause a foreign key violation
Signed-off-by: Frederick Cheung <frederick.cheung@gmail.com >
2009-01-16 17:23:19 +00:00
Michael Lovitt
7a0e7c7270
Fixed broken after_save callback; was being called when before_create was canceled or before_update was canceled
...
Signed-off-by: Michael Koziarski <michael@koziarski.com >
[#1735 state:committed]
2009-01-16 10:11:58 +13:00
Carlos Kozuszko
c891d685de
Fixing bug on ActiveRecord::Dirty#field_changed? for nullable numeric columns, NULL gets stored in database for blank (i.e. '') values. Only integer columns were considered.
...
Signed-off-by: Michael Koziarski <michael@koziarski.com >
[#1692 state:committed]
2009-01-16 10:00:39 +13:00
Hongli Lai (Phusion)
9bcf01b23c
Fix PostgreSQL unit test failures that only occur when using the old 'postgres' driver.
...
[#1748 state:committed]
Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net >
2009-01-13 15:58:50 -08:00
Cody Fauser
b6a94fc1c6
Remove legacy reloadable? method from ActiveRecord::SessionStore [ #1745 state:resolved]
...
Signed-off-by: Joshua Peek <josh@joshpeek.com >
2009-01-13 13:45:10 -06:00
Jeremy Kemper
ab0ce052ba
Introduce transaction_joinable flag to mark that the fixtures transaction can't joined, a new savepoint is required even if :requires_new is not set. Use :requires_new option instead of :nest. Update changelog.
...
[#383 state:committed]
2009-01-10 13:39:37 -08:00
Jeremy Kemper
223a1d9451
Merge branch 'master' into savepoints
2009-01-10 12:14:44 -08:00
Pratik Naik
82443ecfad
Merge commit 'fred/pullable'
2008-12-30 17:50:17 +00:00
Mike Gunderloy
220dff4c3b
Add transaction check to SQLite2 adapter to fix test_sqlite_add_column_in_transaction_raises_statement_invalid [ #1669 state:resolved]
...
Signed-off-by: Pratik Naik <pratiknaik@gmail.com >
2008-12-30 03:07:30 +00:00
David Heinemeier Hansson
0efec64520
Merge branch 'master' of git@github.com:rails/rails
2008-12-28 20:53:58 +01:00
Yaroslav Markin
66ee5890c5
Introduce dynamic scopes for ActiveRecord: you can now use class methods like scoped_by_user_name(user_name) and scoped_by_user_name_and_password(user_name, password) that will use the scoped method with attributes you supply. [ #1648 state:committed]
...
Signed-off-by: David Heinemeier Hansson <david@loudthinking.com >
2008-12-28 20:52:46 +01:00