Jeremy Kemper
290e1e2fc5
Treat any limit > 4 as bigint
2008-06-23 18:16:03 -07:00
Tarmo Tänav
baddea95e1
Always treat integer :limit as byte length. [ #420 state:resolved]
2008-06-22 20:42:31 -07:00
Daniel Morrison
3610997ba3
Partial updates don't update lock_version if nothing changed. [ #426 state:resolved]
2008-06-22 20:33:43 -07:00
Mark Catley
0fd3e4cd2b
Fix column collision with named_scope and :joins. [ #46 state:resolved]
2008-06-22 19:21:15 -07:00
Jeremy Kemper
a210f50361
Oops, already had a postgresql_version method!
2008-06-22 18:50:19 -07:00
ian
3532eaf92a
Only use DROP ... IF EXISTS for PostgreSQL 8.2 or later. [ #400 state:resolved]
2008-06-22 18:31:47 -07:00
Michael Raidel
f94600bdaf
ActiveRecord::Migrator#run records version-state after migrating. [ #369 state:resolved]
2008-06-22 18:16:17 -07:00
Tarmo Tänav
1afae84ab2
Fixed that scopes defined with a string name could not be composed
2008-06-22 17:26:00 -07:00
Tarmo Tänav
509374ebe2
Named bind variables can now be used with postgresql-style typecasts
...
For example :conditions => ['stringcol::integer = :var', { :var => 10 }]
will no longer raise an exception about ':integer' having a missing value.
2008-06-22 16:16:06 -07:00
Diego Algorta
2e1b56c937
MySQL: rename_column preserves default values. [ #466 state:resolved]
2008-06-22 15:21:11 -07:00
rick
10c581a6de
fix merge
2008-06-19 09:59:36 -07:00
Jeremy Kemper
e328bdaab6
Make Base.merge_conditions public
2008-06-17 16:01:48 -07:00
George Ogata
bc4a2f156b
Fix observers that use after_find. [ #375 state:resolved]
...
Signed-off-by: Pratik Naik <pratiknaik@gmail.com >
2008-06-17 19:45:18 +01:00
Ben Munat
ddab9d7fdf
Add :from option to calculations. [ #397 state:resolved]
2008-06-11 18:07:57 -07:00
Antonio Cangiano
e170d34a63
Fixed non-standard SQL generated by preloading has_and_belongs_to_many association
2008-06-11 17:25:39 -07:00
Jeremy Kemper
e6c1f46eb0
Silence scope resolution warnings
2008-06-11 13:17:23 -07:00
Jeremy Kemper
23df8befcd
supports_insert_with_returning? caches false result also
2008-06-11 09:06:36 -07:00
Pratik Naik
6fd73442d8
Update docs to reflect 71bf75
2008-06-11 12:57:19 +01:00
Pratik Naik
71bf756ea2
Disable validations for associated belongs_to record by default
2008-06-11 12:39:56 +01:00
Jan De Poorter
7f140bbdda
Add :validate option to associations. [ #301 state:resolved]
...
Signed-off-by: Pratik Naik <pratiknaik@gmail.com >
2008-06-11 12:21:57 +01:00
Jeremy Kemper
03bf727219
PostgreSQL: use 'INSERT ... RETURNING id' for 8.2 and later.
2008-06-10 18:31:37 -07:00
Jeremy Kemper
b440aeb54a
PostgreSQL: insert looks up pk and sequence name if not given. [ #384 state:resolved]
2008-06-10 15:50:01 -07:00
Brandon Keepers
e94e53f9cd
fix eager loading with dynamic finders
2008-06-09 12:05:20 -04:00
Jeremy Kemper
9051da90e4
Enable autoreconnect if available. Freeze constants.
2008-06-08 22:38:30 -07:00
Jeremy Kemper
d20035910c
Give a more informative error message instead of just raising a load error when mysql gem isn't installed
2008-06-08 22:34:09 -07:00
Jeremy Kemper
def594b92d
Don't append limit to primary key column definition. Freeze some constants.
2008-06-08 22:08:59 -07:00
Jeremy Kemper
d9fb021845
Remove dead, unused vendor/db2.rb
2008-06-08 16:02:49 -07:00
Jeremy Kemper
68af8c54af
Remove vendor/mysql.rb. Deprecated in 2.1 stable, gone in 2.2.
2008-06-08 16:02:25 -07:00
Tiago Macedo
a2f6ded732
Fix conditions and order on join tables with limited eager loading. [ #372 state:resolved]
2008-06-08 13:01:55 -07:00
Jeremy Kemper
21bb0f40b0
PostgreSQL: quote bare table names
2008-06-07 13:39:03 -07:00
Pratik Naik
89ea7bee36
Simplify ActiveRecord::Base#update_attribute
2008-06-07 01:25:27 +01:00
Jeremy Kemper
fd40fbc198
Generate less garbage when expanding range bind variables in conditions
2008-06-06 03:54:16 -07:00
Jeremy Kemper
e660055472
Give a nice message if there are duplicate migrations instead of raising a strange insert error
2008-06-04 12:07:03 -07:00
Craig Demyanovich
aa17716688
Callbacks fire before notifying observers [ #230 state:resolved]
...
Signed-off-by: Joshua Peek <josh@joshpeek.com >
2008-06-03 13:38:00 -05:00
Joshua Peek
c08547d226
Namespace Inflector, Dependencies, OrderedOptions, and TimeZone under ActiveSupport [ #238 state:resolved]
2008-06-03 13:32:53 -05:00
Pratik Naik
bd75a722a2
Ensure AR#sum result is typecasted properly
2008-06-02 20:41:11 +01:00
Jonathan Viney
4210d85a3f
Ensure Associations#sum returns 0 when no rows are returned. [ #295 state:resolved]
...
Signed-off-by: Pratik Naik <pratiknaik@gmail.com >
2008-06-02 12:50:44 +01:00
David Heinemeier Hansson
3282bf3b50
Added SQL escaping for :limit and :offset in MySQL [Jonathan Wiess]
2008-06-01 09:15:11 -07:00
rick
6a975d6ca2
fix changelog conflict
2008-05-31 17:15:24 -07:00
rick
72483c0d4c
Add ActiveRecord::Base.sti_name that checks ActiveRecord::Base#store_full_sti_class? and returns either the full or demodulized name. [rick] [ #114 state:resolved]
2008-05-31 17:13:11 -07:00
David Heinemeier Hansson
cb59c93de0
Merge branch 'master' of git@github.com:rails/rails
2008-05-31 17:03:40 -07:00
David Heinemeier Hansson
f9db7695fe
Making ready for release of 2.1
2008-05-31 17:03:03 -07:00
John D. Hume
f6e921f956
Substitute value into validates_format_of message
...
Signed-off-by: Michael Koziarski <michael@koziarski.com >
2008-05-31 16:59:03 -07:00
David Heinemeier Hansson
ef0ea782b1
Added SQL escaping for :limit and :offset [ #288 state:closed] (Aaron Bedra, Steven Bristol, Jonathan Wiess)
2008-05-31 16:57:46 -07:00
Tim Harper
0580b31b36
belongs_to polymorphic association assignments update the foreign_id and foreign_type fields regardless of whether the record being assigned is new or not.
...
fixes the following scenarios:
* I have validates_inclusion_of on the type field for a polymorphic belongs_to association. I assign a new record to the model's polymorphic relationship of the proper type. validation fails because the type field has not been updated.
* I replace the value for a ppolymorphic association to a new record of another class. The type field still says its the previous class, and the id field points to the previous record as well.
[#191 state:closed]
2008-05-31 13:27:25 -07:00
Jeremy Kemper
2ce1be3ac4
Enable partial updates by default
2008-05-30 04:16:57 -07:00
Andrew White
235d635708
Ensure :select passed in options overrides the one from the scope. [ #239 state:resolved]
...
Signed-off-by: Pratik Naik <pratiknaik@gmail.com >
2008-05-29 14:10:24 +01:00
Pratik Naik
abb1bd2efa
Ensure AssociationCollection#count works with empty condition. [ #271 state:resolved] [Jan De Poorter]
2008-05-29 10:20:39 +01:00
Pratik Naik
4d24854342
Ensure correct db time is reported in production logs.
2008-05-28 22:58:45 +01:00
Ryan Bates
c2fbcba16d
Ensure named_scope#empty? uses count query. [ #262 state:resolved]
...
Signed-off-by: Pratik Naik <pratiknaik@gmail.com >
2008-05-28 11:02:07 +01:00