10265 Commits

Author SHA1 Message Date
David Heinemeier Hansson
f32bceeee1 Merge branch 'master' of git@github.com:rails/rails 2008-05-31 15:51:28 -07:00
David Heinemeier Hansson
9b75483bf3 Added better error message for when the class name is already used (and dont show suggestions if there are none) 2008-05-31 15:51:01 -07:00
Jeremy Kemper
7391f7728d Ruby 1.8.7 compat: work around broken DelegateClass#respond_to? 2008-05-31 15:36:32 -07:00
Joshua Peek
3a9775076f Removed suggestion for turning off partial updates. 2008-05-31 15:34:01 -07:00
Michael Koziarski
0abf0da001 Don't provide the password with dbconsole unless explicitly opted in.
Some operating system configurations allow other users to view your process list
or environmental variables.  This option should not be used on shared hosts.

http://dev.mysql.com/doc/refman/5.0/en/password-security.html
http://www.postgresql.org/docs/8.3/static/libpq-envars.html
2008-05-31 15:30:26 -07:00
Jeremy Kemper
4e4bcb4c6b Ruby 1.8.7 compat: TimeWithZone# and Chars#respond_to? pass along the include_private argument 2008-05-31 14:55:02 -07:00
rick
2243ffd1ff Merge branch 'master' of git@github.com:rails/rails 2008-05-31 13:39:58 -07:00
Tom Ward
77e45352e7 Fixed Dependencies so load errors are not masked behind a 'Expected x.rb to define X' message when mechanism is not set to :load [#87 state:resolved]
Signed-off-by: Joshua Peek <josh@joshpeek.com>
2008-05-31 13:33:38 -07:00
rick
fbd901e8d6 Merge branch 'master' of git@github.com:technoweenie/rails 2008-05-31 13:32:10 -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
Tim Harper
aef47dcf93 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.
2008-05-31 13:23:00 -07:00
Ryan Bates
f7015336f6 Fix default nil tests for MySQL 5.0.51 [#192 state:resolved]
Signed-off-by: Joshua Peek <josh@joshpeek.com>
2008-05-31 12:36:07 -07:00
Jeremy Kemper
03ba5d7b51 Ensure query assertion counts are the same when partial updates are enabled 2008-05-30 04:36:00 -07:00
Jeremy Kemper
2ce1be3ac4 Enable partial updates by default 2008-05-30 04:16:57 -07:00
Jeremy Kemper
946f51449a Require ruby-prof 0.6.1 or later. Use resume/pause to omit extraneous machinery from profile. 2008-05-30 02:39:00 -07:00
Jeremy Kemper
131dd0e912 git ignore rubinius .rbc files 2008-05-30 02:31:39 -07:00
Tekin Suleyman
1b0654ea41 Ensure script/plugin installs ssh/git plugins. [#277 state:resolved]
Signed-off-by: Pratik Naik <pratiknaik@gmail.com>
2008-05-29 20:21:49 +01: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
Adam
cf6299dbd7 Add ActionMailer#reply_to. [#245 state:resolved]
Signed-off-by: Pratik Naik <pratiknaik@gmail.com>
2008-05-29 10:38:00 +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
Jeremy Kemper
888a2927b6 Remove superfluous tests directive 2008-05-26 01:39:21 -07:00
Jeremy Kemper
7520770c82 Don't require AV::TestCases to have a helper class. Only include the helper class in setup if it hasn't been already. 2008-05-26 01:38:56 -07:00
Tarmo Tänav
c5d37c0662 Fix tests for postgres 8.3.x
Made test_with_limiting_with_custom_select not dependent on database
default order. Fixed tests with non-US monetary locale. The monetary
type is fixed precision so it should not expect the database to
return a float.

Signed-off-by: Pratik Naik <pratiknaik@gmail.com>
2008-05-26 00:45:42 +01:00
gbuesing
f88267d532 TimeZone#to_s shows offset as GMT instead of UTC, because GMT will be more familiar to end users (see time zone selects used by Windows OS, google.com and yahoo.com.) Reverts [8370] 2008-05-25 11:56:29 -05:00
Pratik Naik
98dc582742 Merge docrails.
Signed-off-by: Pratik Naik <pratiknaik@gmail.com>
2008-05-25 12:29:00 +01:00
Michael Koziarski
6277fd9113 Fix faulty tests introduced in 8d0b4fa39 2008-05-24 18:34:59 +12:00
Ryan Bates
6cba97d2a4 Create through associations can now work with blocks.
Signed-off-by: Michael Koziarski <michael@koziarski.com>

[#248 state:resolved]
2008-05-24 18:26:13 +12:00
Trevor Turk
b88ceb7dc8 add failing test case for block-setting of attributes via association
Signed-off-by: Michael Koziarski <michael@koziarski.com>
2008-05-24 18:25:33 +12:00
josevalim
8d0b4fa39f Added :select option to has_one and belongs_to, remove unused :order option on belongs_to.
Signed-off-by: Michael Koziarski <michael@koziarski.com>
[#241 state:resolved]
2008-05-24 17:58:03 +12:00
Michael Koziarski
5b8d0f134a Mention partial updates in environment.rb to make it easier for people to opt-in if they know it's safe 2008-05-23 09:07:38 +12:00
Michael Koziarski
888d5059bd Return Partial Updates to be purely opt in to prevent users from inadvertently corrupting data. 2008-05-23 09:00:46 +12:00
Kevin Glowacz
1a73e98660 Fix auto_link helper for already linked urls. [#72 state:resolved]
Signed-off-by: Pratik Naik <pratiknaik@gmail.com>
2008-05-22 21:10:40 +01:00
Frederick Cheung
cff2291df5 Fix failing tests on mysql 4.1 & ruby 1.8.4. [#237 state:resolved]
Signed-off-by: Pratik Naik <pratiknaik@gmail.com>
2008-05-22 12:13:11 +01:00
Lawrence Pit
c2036adf76 Show rails version when the server starts. [#235 state:resolved]
Signed-off-by: Pratik Naik <pratiknaik@gmail.com>
2008-05-22 12:06:27 +01:00
Ryan Bates
4e084c3d98 Add Rails.version. [#236 state:resolved]
Signed-off-by: Pratik Naik <pratiknaik@gmail.com>
2008-05-22 11:56:30 +01:00
Adam
314e556e6f Parentheses should be acceptable characters for auto_link_urls. [#234 state:resolved]
Signed-off-by: Pratik Naik <pratiknaik@gmail.com>
2008-05-22 11:16:02 +01:00
Frederick Cheung
dd9938a44e Fix mysql 4.1 incompatibility in the active record schema tests.
Signed-off-by: Michael Koziarski <michael@koziarski.com>
[#233 state:resolved ]
2008-05-22 11:02:27 +12:00
Ryan Bates
262d23d763 ActiveRecord::Base#reload should clear dirty attributes. [#231 state:resolved]
Signed-off-by: Pratik Naik <pratiknaik@gmail.com>
2008-05-21 20:40:52 +01:00
Erkki Eilonen
6e3521e613 Improve check_box_checked? to use include? for Array values. [#193 state:resolved]
Signed-off-by: Pratik Naik <pratiknaik@gmail.com>
2008-05-21 20:23:58 +01:00
Pratik Naik
19d7b1d22b Verbose ActiveRecord::AssociationTypeMismatch exception message. [#189 state:resolved] 2008-05-21 10:46:28 +01:00
Pratik Naik
281edce6db Ensure nil to '' doesn't get recorded by dirty for nullable integer columns. [#150 state:resolved] [Jason Dew, Pratik] 2008-05-20 20:53:47 +01:00
Ryan Bates
73c5963854 Add first/last methods to associations/named_scope. [#226 state:resolved]
Signed-off-by: Pratik Naik <pratiknaik@gmail.com>
2008-05-20 12:27:14 +01:00
Tom Ward
ebb642fa3a Fix Dependencies watch_frames collection. [#24 state:resolved]
Previously, the code collecting watch_frames could fail leaving
watch_frames defined but nil. The cleanup code checks watch_frames
is defined, but not that it holds a value, raising an undefined method
on NilClass error rather than the original cause.  This can make
debugging the underlying cause a total pain.

Signed-off-by: Pratik Naik <pratiknaik@gmail.com>
2008-05-20 11:44:23 +01:00
Pratik Naik
0892515811 Ensure add_column gives valid error for sqlite. [Gunnar Wolf, Pratik] [#197 state:resolved]
SQLite#add_column executes "VACUUM", which fails if inside a live transaction. This patch
ensures a valid exception is raised if add_column is executed within a live transaction for
sqlite adapter.
2008-05-20 11:10:38 +01:00
Jeremy Kemper
1b0128c541 Don't rely on association proxying object_id. [#225 state:resolved] 2008-05-19 19:12:56 -07:00
Nate Wiger
a34cc42a2c - Updated tzinfo to use Rational() instead of Rational.new! due to "private method new!" in Ruby 1.9 - Added ^object_id$ as ignore pattern to fixing "redefining object_id" issue in Ruby 1.9
Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net>
2008-05-19 19:07:01 -07:00
Jeremy Kemper
762295e0ae Bundle tmail 1.2.3 2008-05-19 19:04:28 -07:00
Jeremy Kemper
b43309328a Ruby 1.9 compat: ensure binary encoding for post body parsing 2008-05-19 16:24:26 -07:00