Patrick Reagan
683ff235e6
Ensure t.timestamps respects options. [ #828 state:resolved]
...
Signed-off-by: Pratik Naik <pratiknaik@gmail.com >
2008-08-22 12:48:00 +01:00
Tarmo Tänav
52ac9d0444
Fixed ordering in test_find_in_association_with_custom_finder_sql_and_multiple_interpolations
2008-08-22 10:39:45 +03:00
Tarmo Tänav
d3b894563a
Properly quote CREATE DATABASE parameters in postgresql [ #771 state:resolved]
2008-08-22 10:37:09 +03:00
Jeremy Kemper
6e3d2a7996
Revert "Performance: freeze cached rows instead of duping"
...
This reverts commit cd8e653d5b .
2008-08-21 21:40:49 -07:00
Jeremy Kemper
a5eb297424
Revert "coerce blank strings to nil values for boolean and integer fields"
...
This reverts commit aee14630d4 .
[#860 state:incomplete]
2008-08-21 21:34:37 -07:00
S. Brent Faulkner
bbedb6a624
remember created records and select a random one instead of relying on sequential id values starting at 1
...
Signed-off-by: Michael Koziarski <michael@koziarski.com >
2008-08-21 19:33:26 +02:00
Josh Susser
aee14630d4
coerce blank strings to nil values for boolean and integer fields
...
Signed-off-by: Michael Koziarski <michael@koziarski.com >
2008-08-21 19:33:25 +02:00
Peter Wagenet
8622787f87
Don't interpret decimals as table names in ActiveRecord::Associations::ClassMethods#references_eager_loaded_tables? [ #532 state:resolved]
...
Signed-off-by: Pratik Naik <pratiknaik@gmail.com >
2008-08-21 17:21:17 +01:00
Tom Lea
3724dafe71
Fix incorrect signature for NamedScope#respond_to? [ #852 state:resolved]
...
Signed-off-by: Pratik Naik <pratiknaik@gmail.com >
2008-08-21 16:39:27 +01:00
Miles Georgi
0d74e72e6d
Fix postgres bug when change_column is called with invalid parameters. [ #861 state:resolved]
...
Signed-off-by: Tarmo Tänav <tarmo@itech.ee >
Signed-off-by: Pratik Naik <pratiknaik@gmail.com >
2008-08-21 16:22:14 +01:00
Philip Hallstrom
49c0e1e594
Fix generated WHERE IN query for named scopes. [ #583 state:resolved]
...
Signed-off-by: Pratik Naik <pratiknaik@gmail.com >
2008-08-21 16:11:28 +01:00
Xavier Noria
a970f916fb
Fix has_many#count_records. [ #865 state:resolved]
...
Signed-off-by: Pratik Naik <pratiknaik@gmail.com >
2008-08-21 15:48:04 +01:00
Jakub Kuźma
ea40f71431
Fix that has_one natural assignment to already associated record. [ #854 state:resolved]
...
Signed-off-by: Pratik Naik <pratiknaik@gmail.com >
2008-08-21 15:21:21 +01:00
Ryan Bates
2415652660
Support find_all on named scopes. [ #730 state:resolved]
...
Signed-off-by: Pratik Naik <pratiknaik@gmail.com >
2008-08-21 12:37:19 +01:00
Joshua Peek
c1a8690d58
Consistently use the framework's configured logger and avoid reverting to RAILS_DEFAULT_LOGGER unless necessary.
2008-08-18 23:36:13 -05:00
Jeremy Kemper
cd8e653d5b
Performance: freeze cached rows instead of duping
2008-08-18 17:34:38 -07:00
Tarmo Tänav
96607996ea
Test for eager loading of STI subclasses from htm associations
...
Signed-off-by: Pratik Naik <pratiknaik@gmail.com >
2008-08-16 22:26:11 +01:00
Nathan Witmer
8cfdcdb35d
Updated has_and_belongs_to_many association to fix :finder_sql interpolation. [ #848 state:resolved]
...
Signed-off-by: Pratik Naik <pratiknaik@gmail.com >
2008-08-16 22:23:48 +01:00
Tarmo Tänav
2b69a636c4
Fixed STI type condition for eager loading of associations
...
Signed-off-by: Pratik Naik <pratiknaik@gmail.com >
2008-08-16 20:41:19 +01:00
Ryan Bates
8f4d3957a6
Don't raise exception when comparing ActiveRecord::Reflection. [ #842 state:resolved]
...
Signed-off-by: Pratik Naik <pratiknaik@gmail.com >
2008-08-16 20:21:36 +01:00
Tarmo Tänav
b3c9d53b34
Use type_condition method for hmt STI condition
2008-08-15 15:57:33 -07:00
Tarmo Tänav
e3523f1d33
Fixed validates_uniqueness_of with decimal columns
...
Only use special case-sensitive comparison operators for text columns in
validates_uniqueness_of as mysql can fail at decimal comparisons with
the BINARY operator.
2008-08-15 15:44:11 -07:00
Eloy Duran
1ee9e3fa5c
Fix ActiveRecord::NamedScope::Scope#respond_to? [ #818 state:resolved]
...
Signed-off-by: Pratik Naik <pratiknaik@gmail.com >
2008-08-13 13:04:42 +01:00
Tarmo Tänav
a5aad2e81f
Fixed Time/Date object serialization
...
Time/Date objects used to be converted to_s instead of to_uaml
which made them unserializable.
2008-08-12 20:29:07 -07:00
Tom Lea
992fda16ed
Serialized attributes will now always be saved even with partial_updates turned on.
...
Signed-off-by: Michael Koziarski <michael@koziarski.com >
[#788 state:committed]
2008-08-12 18:15:50 +02:00
Trevor Turk
81c12d1f63
move logging of protected attribute removal into log_protected_attribute_removal method
...
Signed-off-by: Michael Koziarski <michael@koziarski.com >
[#804 status:committed]
2008-08-12 09:52:06 +02:00
Michalis Polakis
c7375d74d9
Alias subquery used in calculations, to provide better compatibility with databases such as MonetDB
...
Signed-off-by: Michael Koziarski <michael@koziarski.com >
Signed-off-by: Tom Ward <tom@popdog.net >
[#796 state:committed]
2008-08-11 16:48:45 +02:00
Ernie Miller
7f6e7ba1f7
Fixed AssociationCollection#<< resulting in unexpected values in @target when :uniq => true
...
Signed-off-by: Michael Koziarski <michael@koziarski.com >
2008-08-08 15:19:08 +02:00
Ryan Bates
1db7c9cf4a
fixing "test_any_should_not_load_results" so it doesn't depend on latest version of Mocha
...
Signed-off-by: Michael Koziarski <michael@koziarski.com >
2008-08-08 10:33:29 +02:00
Nik Wakelin
0809747845
Added MigrationProxy to defer loading of Migration classes until they are actually required by the migrator
...
Signed-off-by: Michael Koziarski <michael@koziarski.com >
[#747 state:resolved]
2008-08-06 12:46:52 +02:00
Tarmo Tänav
82343859d5
Added missing fixtures for tests which fail to run independently if run after schema reset
...
Signed-off-by: Michael Koziarski <michael@koziarski.com >
2008-08-04 11:50:15 +02:00
Tarmo Tänav
656f0e7c6c
Fix file permissions
...
Signed-off-by: Joshua Peek <josh@joshpeek.com >
2008-07-31 16:36:23 -05:00
Tarmo Tänav
f7eaab96d3
validates_uniqueness_of uses database case sensitivity support instead of using ruby
...
Signed-off-by: Michael Koziarski <michael@koziarski.com >
2008-07-31 21:33:11 +02:00
Tarmo Tänav
cb68b21a52
Fixed negative default integer parsing for Postgresql 8.3.3
...
Signed-off-by: Michael Koziarski <michael@koziarski.com >
2008-07-31 20:58:42 +02:00
Tarmo Tänav
68b207b087
Cast value to string in validates_uniqueness_of if the column is of text type
...
This fixes an error for postgresql where "text_column = 100" fails in version 8.3
Signed-off-by: Michael Koziarski <michael@koziarski.com >
2008-07-31 20:28:39 +02:00
Tarmo Tänav
896a3b9ab8
Fixed test_joins_with_namespaced_model_should_use_correct_type for postgresql
...
Signed-off-by: Michael Koziarski <michael@koziarski.com >
2008-07-31 19:02:32 +02:00
miloops
fb5cc19707
Fix HasManyThroughAssociationsTest tests. [ #733 state:resolved]
...
Signed-off-by: Pratik Naik <pratiknaik@gmail.com >
2008-07-31 17:01:22 +01:00
Pratik Naik
108db00aa9
Raise UnknownAttributeError when unknown attributes are supplied via mass assignment
2008-07-31 15:56:46 +01:00
Pratik Naik
6e75455125
Merge docrails changes
2008-07-28 12:33:24 +01:00
Joshua Peek
490178c930
Revert "Ensure adapater specific code is loaded on ActiveRecord::Base.establish_connection"
...
This reverts commit 8b858782fa .
2008-07-27 16:06:51 -05:00
George Ogata
e8fc894f66
Make observers define #after_find in the model only if needed.
...
[#676 state:resolved]
Signed-off-by: Michael Koziarski <michael@koziarski.com >
2008-07-26 16:26:08 +02:00
Jan De Poorter
93e10f9911
Ensure NamedScope#any? uses COUNT query wherever possible. [ #680 state:resolved]
...
Signed-off-by: Pratik Naik <pratiknaik@gmail.com >
2008-07-23 12:02:17 +01:00
Joshua Peek
8b858782fa
Ensure adapater specific code is loaded on ActiveRecord::Base.establish_connection
2008-07-21 22:41:38 -05:00
Daniel Guettler
c67713a2fe
Use klass.sti_name to make sure associations take store_full_sti_class into account. [ #671 state:resolved]
...
Signed-off-by: Pratik Naik <pratiknaik@gmail.com >
2008-07-22 01:24:47 +01:00
Joshua Peek
3fdd1acab6
Dropped SQLite 2 from default test runner
2008-07-19 11:30:15 -05:00
Tom Ward
f205939348
Ensure checked value is a string when validating case-sensitive uniqueness [ #361 state:resolved]
...
Signed-off-by: Pratik Naik <pratiknaik@gmail.com >
2008-07-19 16:14:39 +01:00
Joachim Garth
a1fcbd971d
Make sure association preloading works with full STI class name [ #465 state:Resolved]
...
Signed-off-by: Pratik Naik <pratiknaik@gmail.com >
2008-07-18 03:44:44 +01:00
Jeremy Kemper
1e0f94a77c
Introduce simple internationalization support
2008-07-17 14:56:12 -07:00
Jeremy Kemper
636e6b7138
Merge branch 'master' into i18n-merge
...
Conflicts:
actionpack/lib/action_view/helpers/form_options_helper.rb
activerecord/lib/active_record/validations.rb
2008-07-17 11:52:56 -07:00
Nik Wakelin
bbab639136
Set config.active_record.timestamped_migrations = false to have migrations with numeric prefix instead of UTC timestamp. [ #446 state:resolved]
...
Signed-off-by: Pratik Naik <pratiknaik@gmail.com >
2008-07-17 02:54:45 +01:00