Commit Graph

6944 Commits

Author SHA1 Message Date
Pratik Naik
802034ff5f DRY associations code and improve eager loading tests. 2008-05-15 13:47:05 +01:00
John Devine
b28b54cab0 Make sure needed table joins are included :select option. [#110 state:resolved]
Signed-off-by: Pratik Naik <pratiknaik@gmail.com>
2008-05-15 13:42:28 +01:00
Robby Russell
6df995bbf2 Adding an example test case for pluralize for (y) -> (ies) 2008-05-14 17:17:24 -07:00
Joshua Peek
603c853a34 Don't fallback to just adding "'s" in TextHelper#pluralize, because the Inflector is always loaded. 2008-05-14 14:34:28 -05:00
Joshua Peek
bc3cc91a3f One last fix to test_filter_parameters_is_protected. 2008-05-14 14:14:23 -05:00
Joshua Peek
3b0e1d9093 Prefer string core_ext inflector methods over directly accessing Inflector. 2008-05-14 14:09:49 -05:00
Joshua Peek
f32b974338 Clean up previously commited test. 2008-05-14 13:55:14 -05:00
Joshua Peek
1066b16237 Improve test coverage for filter_parameters [José Valim] 2008-05-14 13:38:02 -05:00
Joshua Peek
8d37bd08ee Protect #filter_parameters created by filter_parameter_logging [José Valim] [#196 state:resolved] 2008-05-14 13:00:09 -05:00
Joshua Peek
49846f8586 Create a seperate file for ActiveSupport::OrderedHash. 2008-05-14 12:48:37 -05:00
Joshua Peek
7708650f73 Added conditional support to caches_action [José Valim] [#166 state:resolved] 2008-05-14 12:33:54 -05:00
Rodrigo Kochenburger
bca8751e40 Add ActiveRecord option to store the full class name on STI's type column, allowing one to have STI subclasses in different namespaces [#114]
Signed-off-by: rick <technoweenie@gmail.com>
2008-05-13 15:04:11 -07:00
Amol Hatwar
2d372d7049 Fixed generator collisions for nested controller modules.
Signed-off-by: Joshua Peek <josh@joshpeek.com>
2008-05-13 16:02:56 -05:00
Joshua Peek
4562a5b57f Add some test coverage for RailsControllerGenerator. 2008-05-13 15:50:06 -05:00
Tim Pope
3a0d8adcf2 Fix tests broken by mocha absence [#186 state:resolved]
Two ActiveRecord tests depended on mocha but were not marked as such.
Place them in a use_mocha block so the test suite passes.

Signed-off-by: Pratik Naik <pratiknaik@gmail.com>
2008-05-13 21:02:13 +01:00
Rich Cavanaugh
d8bcec6ce6 make CGI::Cookie handle deleting a cookie properly
Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net>
2008-05-13 10:51:55 -07:00
Andre Arko
d16fbe53b2 Fix remote_function to escape apostrophes inside the remote url passed to Ajax.Update. [#180 state:resolved]
Signed-off-by: Pratik Naik <pratiknaik@gmail.com>
2008-05-13 18:33:33 +01:00
Tarmo Tänav
3fee2378ed Use 'public' schema path when connecting to 'postgres' database. [#170 state:resolved]
Signed-off-by: Pratik Naik <pratiknaik@gmail.com>
2008-05-13 18:25:30 +01:00
Daniel Morrison
f498f221bd Include time zone offset in TimeWithZone#to_json 2008-05-13 09:50:45 -07:00
rick
74fd17346f Merge branch 'master' of git@github.com:rails/rails 2008-05-13 09:41:10 -07:00
Tarmo Tänav
4dedc7ddca Use 'postgres' database instead of 'template1'
The 'postgres' database is meant for use by utilities and third
party applications. CONNECT permission to the 'template1' database
is usually only available to superusers which is why 'postgres'
should be preferred as users whith "CREATE DATABASE" permissions
are not neccessarily superusers.
2008-05-13 17:34:47 +01:00
Matthew Brindley
9fb01ce4b1 ScaffoldGenerator to create public/stylesheets if missing. [#165 state:resolved]
Signed-off-by: Pratik Naik <pratiknaik@gmail.com>
2008-05-13 10:50:00 +01:00
Pratik Naik
2270371f5d Remove unnecessary DeprecatedInstanceVariable class 2008-05-13 10:39:45 +01:00
Xavier Noria
593e21d6ae Dirty attributes aren't cleared if save fails. [#174 state:resolved]
Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net>
2008-05-12 17:04:17 -07:00
Rich Cavanaugh
a425cd1473 Don't double-escape cookie store data. Don't split cookie values with newlines into an array. [#130 state:resolved]
Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net>
2008-05-12 15:26:19 -07:00
Jeremy Kemper
cde6a259bf Simpler rescue_action condition 2008-05-12 13:24:32 -07:00
Jeremy Kemper
f2e4bf218f Use #duplicable? instead of anonymous rescue 2008-05-12 13:24:32 -07:00
Jeremy Kemper
828914a062 Ruby 1.9 compat: define __setobj__ for Delegator 2008-05-12 13:24:32 -07:00
Frederick Cheung
d2212c1601 Remove AR::Base#attributes argument. [#52 state:resolved]
Signed-off-by: Pratik Naik <pratiknaik@gmail.com>
2008-05-12 00:35:42 +01:00
David Heinemeier Hansson
00640de861 Updated copyright years 2008-05-11 18:34:05 -05:00
David Heinemeier Hansson
b60c8a573e Making ready for RC1 release 2008-05-11 18:29:44 -05:00
David Heinemeier Hansson
f1b6e1ae61 No more svn version numbers to rely on, use timestamps instead 2008-05-11 18:21:47 -05:00
David Heinemeier Hansson
5d9c602698 Depend on latest Rake 2008-05-11 18:21:19 -05:00
Pratik Naik
c11bd7e713 Merge branch 'master' of git@github.com:rails/rails 2008-05-11 23:59:27 +01:00
Pratik Naik
80e18e759e Ensure dbconsole respects erb in database.yml. [#157 state:resolved] [Andrew Bennett]
Signed-off-by: Pratik Naik <pratiknaik@gmail.com>
2008-05-11 23:58:04 +01:00
Michael Schuerig
9a137506a1 Added not to sanitize helper docs that it doesn't guarantee well-formed markup.
Signed-off-by: Michael Koziarski <michael@koziarski.com>

[#166 state:resolved]
2008-05-12 10:22:17 +12:00
Frederick Cheung
236f0bb67a When preloading group by reflection rather than by class [#125 state:resolved]
This avoids extra queries when several subclasses inherit the association
from their parent class, while still coping with subclasses redefining
associations.

Signed-off-by: Pratik Naik <pratiknaik@gmail.com>
2008-05-11 22:14:07 +01:00
Jonathan Viney
0cbdd96c34 Fix blank conditions on AssociationCollection#find. [#104 state:resolved]
Signed-off-by: Pratik Naik <pratiknaik@gmail.com>
2008-05-11 21:01:18 +01:00
Duncan Beevers
0b8b582e06 Add test for named_scope#proxy_options. [#97 state:resolved] 2008-05-11 20:33:25 +01:00
Frederick Cheung
3f0dccbbc7 Ensure hm:t preloading honours reflection options. [#137 state:resolved]
Signed-off-by: Pratik Naik <pratiknaik@gmail.com>
2008-05-11 20:01:14 +01:00
Cheah Chu Yeow
8f2f88f128 Remove unused JSON methods. [#164 state:resolved]
Signed-off-by: Pratik Naik <pratiknaik@gmail.com>
2008-05-11 19:49:47 +01:00
Aslak Hellesøy
10fdf44236 Added protection against duplicate migration names (Aslak Hellesøy) [#112 state:resolved] 2008-05-11 13:37:29 -05:00
Alex MacCaw
4cc594bd70 Fix validates_uniqueness_of for SQL keywords [#23 state:resolved]
Signed-off-by: Pratik Naik <pratiknaik@gmail.com>
2008-05-11 19:30:03 +01:00
David Heinemeier Hansson
0dabb5b7ab Fixed that forgery protection can be used without session tracking (Peter Jones) [#139 state:resolved] 2008-05-11 13:28:50 -05:00
Peter Jones
2a986200b9 Bug: Earlier Check for Session in Forgery Protection
The session is used by the form_authenticity_token method before it is
tested to be valid.  This patch moves a few lines around so that the
session is validated first.

Without this patch, if you try to use forgery protection with sessions
turned off, you get this exception message:

  undefined method `session_id' for {}:Hash

The patch includes a test that can be used to see this behavior before
the request_forgery_protection.rb file is patched to fix it.
2008-05-11 13:27:34 -05:00
David Heinemeier Hansson
7013d9e52a Fix generate_app_doc task (Jaroslaw) [#70 state:resolved] 2008-05-11 13:20:53 -05:00
David Heinemeier Hansson
c43623c48b Added session(:on) to turn session management back on in a controller subclass if the superclass turned it off (Peter Jones) [#136 state:resolved] 2008-05-11 13:18:49 -05:00
David Heinemeier Hansson
8857994f92 Added session(:on) to turn session management back on in a controller subclass if the superclass turned it off (Peter Jones) [#136 state:resolved] 2008-05-11 13:13:31 -05:00
Andreas Neuhaus
74eed6290e Fixed flash.now not being accessible in tests. Flash sweeping is now done before action processing instead after
Signed-off-by: Michael Koziarski <michael@koziarski.com>

[#10 state:resolved]
2008-05-11 18:30:10 +12:00
rick
d09a8446d5 fix merge conflict with actionpack changelog 2008-05-10 17:46:55 -07:00