Pratik Naik
beca1f2e15
Template#mime_type should not use Mime::Type when Action Controller is not included
2009-02-02 00:21:03 +00:00
David Heinemeier Hansson
ed5fa2fe33
Mark CHANGELOGs for release
2009-02-01 22:06:40 +01:00
Pratik Naik
886124e688
Merge docrails
2009-02-01 18:25:03 +00:00
Mike Gunderloy
3be0ad60e4
Add Rails Guides to the default links on generated index.html [ #1839 state:resolved]
...
Signed-off-by: Pratik Naik <pratiknaik@gmail.com >
2009-02-01 17:41:12 +00:00
Mike Gunderloy
8d35b36d1a
Add :reconnect option to generated mysql database.yml [ #1838 state:resolved]
...
Signed-off-by: Pratik Naik <pratiknaik@gmail.com >
2009-02-01 17:39:20 +00:00
Joshua Peek
5b5d0e325d
Use Rack::Head middleware to ensure the body is discarded for HEAD requests
2009-02-01 01:01:49 -06:00
Joshua Peek
63b4fe53ab
Remove ancient tests for CGI parsing bug
2009-01-31 23:51:42 -06:00
Joshua Peek
28b65c9120
Removed Prototype specific Safari 2 AJAX hack.
...
The normal null character stripper is still there.
2009-01-31 23:51:41 -06:00
Michael Koziarski
fa7aa19a99
Don't rely on the order in these tests
2009-02-01 15:27:41 +13: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
Tarmo Tänav
80747e9db1
Removed map.resources :only/:except inheritance
...
It's very rare for these options to apply identically to nested child resources, and with this inheritance on it's very difficult to have a child resource with more actions than the parent.
This reverts commit 2ecec6052f .
Signed-off-by: Michael Koziarski <michael@koziarski.com >
[#1826 state:committed]
2009-02-01 14:47:56 +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
Jeremy Kemper
a02d752ae4
Ruby 1.9 compat: omit Rack::Lint from integration tests until it accepts String headers and bodies
2009-01-31 11:03:00 -08:00
Jeremy Kemper
bc94061156
Fix unsorted array comparison
2009-01-31 10:56:16 -08:00
Jeremy Kemper
4790e02e74
Ruby 1.9 compat: work around that String is not Enumerable
2009-01-31 10:55:47 -08:00
Luca Guidi
75b2e7e9c9
Make sure XmlMini is being correctly autoloaded by Ruby 1.9.1
...
Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net >
2009-01-31 10:26:24 -08:00
Charles Nutter
ed0e564087
Ensure constant_watch_stack is protected by a mutex, so concurrent requires do not corrupt it.
...
[#1816 state:committed]
Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net >
2009-01-30 08:27:03 -08:00
Scott Taylor
2dedb5b03a
Controller, response, and request should all refer to same session, even after a call to session_reset [ #1823 state:resolved]
...
Signed-off-by: Joshua Peek <josh@joshpeek.com >
2009-01-29 19:39:48 -06:00
Mike Gaffney
1b79683171
Deprecation tests for f17c876 [ #1801 state:resolved]
...
Signed-off-by: Joshua Peek <josh@joshpeek.com >
2009-01-29 19:37:38 -06:00
Pratik Naik
b3bc4fa5e0
Digest#validate_digest_response should accept request instead of controller
2009-01-29 22:06:03 +00:00
Jon Crawford
8761663a68
Added grouped_options_for_select helper method for wrapping option tags in optgroups. [ #977 state:resolved]
...
Signed-off-by: Pratik Naik <pratiknaik@gmail.com >
2009-01-29 18:00:18 +00:00
Gregg Kellogg
306cc2b920
Implement HTTP Digest authentication. [ #1230 state:resolved] [Gregg Kellogg, Pratik Naik]
...
Signed-off-by: Pratik Naik <pratiknaik@gmail.com >
2009-01-29 16:01:59 +00: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
Michael Koziarski
feed7b4cfd
Move to use pg instead of postgres on the CI server
2009-01-29 17:07:29 +13:00
Joshua Peek
2e69db18ce
Only dup local cache values if duplicable [ #1653 state:resolved]
2009-01-28 21:20:46 -06:00
Pratik Naik
a1a9889b06
Move basic auth test controller inside the test class
2009-01-29 01:59:55 +00:00
Bob Aman
166c63818e
Improve exception handling when Location header is invalid. [ #1192 state:resolved]
...
Signed-off-by: Pratik Naik <pratiknaik@gmail.com >
2009-01-28 20:56:46 +00:00
Dan Weinand
91eeb0ff11
Using the highlight helper on text with html shouldn't highlight text inside html attributes. [ #1302 state:resolved]
...
Signed-off-by: Pratik Naik <pratiknaik@gmail.com >
2009-01-28 19:53:59 +00: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
Bryan Ray
f725b19710
Added options to script/dbconsole to sqlite3 console in various different modes. [ #607 state:resolved]
...
Signed-off-by: Pratik Naik <pratiknaik@gmail.com >
2009-01-28 19:47:45 +00:00
Rasik Pandey
6079ec1f77
ActiveResource#eqls? and == should not take into account object identity and prefix options should be considered. [ #1098 state:resolved]
...
Signed-off-by: Pratik Naik <pratiknaik@gmail.com >
2009-01-28 19:39:06 +00:00
Daniel Rodríguez Troitiño
9a8e2a059c
Ensure selected option is not ignored for collection_select. [ #1037 state:resolved]
...
Signed-off-by: Pratik Naik <pratiknaik@gmail.com >
2009-01-28 19:35:18 +00:00
Nathan de Vries
32eeb3e521
Ensure that when UrlWriter is included in multiple classes, the default_url_options of one don't affect the other. [ #1277 state:resolved]
...
Signed-off-by: Pratik Naik <pratiknaik@gmail.com >
2009-01-28 19:31:48 +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
Pratik Naik
2ae8d3079b
Session cookie header should always be set if :expire_after option is specified
2009-01-28 05:05:48 +00:00
Jeremy Kemper
9714a9b001
Use toplevel reference to ::StringIO since we're in a BasicObject.
2009-01-27 15:25:05 -08:00
David Heinemeier Hansson
e73445ba1b
Merge branch 'master' of git@github.com:rails/rails
2009-01-27 16:13:23 -06:00
Tys von Gaza
dd02af5c7e
Fix for sweepers method_missing missing &block argument [ #1581 status:committed]
...
Signed-off-by: David Heinemeier Hansson <david@loudthinking.com >
2009-01-27 16:11:45 -06:00
Joshua Peek
f716ab92bf
Disable eager loading for all rake tasks [ #802 state:resolved]
2009-01-27 15:53:02 -06:00
Joshua Peek
093f758bd0
Restore implicit rendering for XHR requests that want a HTML template [ #1590 state:resolved]
2009-01-27 14:09:11 -06:00
Joshua Peek
f17c87665e
Fixed deprecated methods on TestSession [ #1801 state:resolved]
2009-01-27 12:28:05 -06:00
Pratik Naik
57b156b338
Dont use Memoizable for ActionController::Request
2009-01-27 17:26:37 +00:00
Yaroslav Markin
17db28f1ca
Improve i18n support for number_to_human_size helper:
...
* now using pluralization properly
* storage unit translations moved to number.human.storage_units.units
* introduced number.human.storage_units.format for languages that do not follow "{{number}} {{unit}}" format (Japanese)
NOTE: I18n table changed, you will need to update your translations.
[#1634 state:committed]
Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net >
2009-01-27 09:22:00 -08:00
Joshua Peek
a1ac635d96
Ensure the full path is used when searching for layouts [ #1803 state:resolved]
2009-01-27 11:08:29 -06: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
Joshua Peek
57f0b85900
Fix for failing ActionMailer multipart tests
2009-01-26 13:15:29 -06:00
Joshua Peek
a98cd7ca9b
Add localized templates
...
# Default locale
app/views/messages/index.html.erb
# I18n.locale is set to :da (Danish)
app/views/messages/index.da.html.erb
2009-01-25 22:51:21 -06:00
Sven Fuchs
5c062bf100
add #available_locales to I18n and I18n::SimpleBackend, flatten translations load_path when loading translations [ #1714 state:resolved]
...
Signed-off-by: Joshua Peek <josh@joshpeek.com >
2009-01-25 22:51:21 -06:00
Greg Borenstein
f4bf318db0
add an inspect method to OrderedHash to make it clear that it is not a species of Array
...
Signed-off-by: Michael Koziarski <michael@koziarski.com >
[#1782 state:committed]
2009-01-26 16:26:37 +13:00
Stephen Bannasch
4ef9845aa3
Adding AR tests for JDBC connections
...
New connections:
jdbcmysql jdbcpostgresql jdbcsqlite3 jdbcderby jdbch2 jdbchsqldb jdbcpostgresql
To test you will need the native database installed (if one is required),
activerecord-jdbc-adapter and the specific activerecord-jdbc<database>-adapter
for the database you are testing.
Run the tests like this:
jruby -S rake test_jdbcmysql
Signed-off-by: Michael Koziarski <michael@koziarski.com >
[#1685 state:committed]
2009-01-26 16:08:44 +13:00
Pratik Naik
617ad23574
Remove the irrelevant fixture added in fe6ffce51d
2009-01-24 18:22:17 +00:00
Pratik Naik
fe6ffce51d
Make sure inner scope conditions get a preference over the outer ones
2009-01-24 17:54:10 +00:00
Pratik Naik
b2192888ab
Fix the changelog entry
2009-01-23 15:38:19 +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
Joshua Peek
73cc5f270a
Setup ActiveRecord QueryCache middleware in the initializer
2009-01-21 12:44:07 -06:00
Joshua Peek
82334a7431
Only insert metal middleware if any exist
2009-01-21 12:37:03 -06:00
Joshua Peek
ae3a93ad89
Missed RequestParser in ff0a267
2009-01-21 12:29:41 -06:00
Joshua Peek
a8ad6568f9
Allow empty files to be uploaded
2009-01-20 20:34:35 -06:00
Joshua Peek
7e4d13d357
Add MiddlewareStack#swap
...
config.middleware.swap ActionController::Session::CookieStore, MySessionStore
2009-01-20 20:19:52 -06:00
Mislav Marohnić
01f06fc7f4
Don't let empty Tempfiles come through as uploaded files [ #1785 state:resolved]
...
Signed-off-by: Joshua Peek <josh@joshpeek.com >
2009-01-20 12:38:25 -06:00
Cody Fauser
c090e5e075
Restore cookie store httponly default to true. Remove extraneous dup of options on initialization [ #1784 state:resolved]
...
Signed-off-by: Joshua Peek <josh@joshpeek.com >
2009-01-20 11:50:43 -06:00
Pratik Naik
9cefd5ea0c
Deprecate ActionController::Base#session_enabled?
2009-01-19 18:53:14 +00:00
Pratik Naik
68fdfde003
Improve HTTP Basic authentication tests
2009-01-18 19:21:34 +00: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
Pratik Naik
41af606db3
Remove script/performance/profiler in favour of performance integration tests.
...
To continue using script/performance/profiler, install the request_profiler plugin :
script/plugin install git://github.com/rails/request_profiler.git
2009-01-18 05:20:39 +00:00
Jose' Valim
c2e7851fb2
Add ActionMailer::Base#enable_starttls_auto option for enabling/disabling STARTTLS. [ #1731 state:resolved]
...
Signed-off-by: Pratik Naik <pratiknaik@gmail.com >
2009-01-18 04:19:18 +00:00
Joshua Peek
ff0a2678c4
Build query string and POST params parser on top of Rack::Request. Also switch our multipart parser to use Racks. Moved XML, JSON, and YAML parsers into ActionController::ParamsParser middleware [ #1661 state:resolved]
2009-01-17 20:29:50 -06:00
Joshua Peek
aab760c3df
Add test coverage for fixing Safari 2 trailing null character
2009-01-17 20:03:22 -06:00
Josh Susser
78f2c19ae7
Refactor Object#try to use inheritance. [ #1774 state:resolved]
...
Signed-off-by: Pratik Naik <pratiknaik@gmail.com >
2009-01-18 00:47:38 +00:00
Pratik Naik
3b1cd9e525
Fix has_and_belongs_to_many_associations tests. #1738
2009-01-18 00:34:57 +00:00
Lourens Naude
b08c968875
Decouple the local cache strategy from MemCacheStore for reuse with other remote stores [ #1653 state:resolved]
...
Signed-off-by: Joshua Peek <josh@joshpeek.com >
2009-01-17 18:05:48 -06:00
Joshua Peek
29e7a02428
Ensure any method sent to RewindableIO reads the original IO object [ #1767 state:resolved]
2009-01-17 11:12:18 -06:00
Joshua Peek
515a1a3328
Lock middleware has been committed upstream
2009-01-17 10:16:31 -06: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
Jeremy Kemper
fe013ce934
Fix performance regression
2009-01-16 20:36:59 -08:00
Jeremy Kemper
78af271069
Skip respond_to check so rack.input doesn't have to implement it
2009-01-16 20:36:59 -08:00
Mike Gunderloy
1e02d95d60
Make ActioMailer quoting test play nice with Ruby 1.9 [ #1726 state:resolved]
...
Signed-off-by: Pratik Naik <pratiknaik@gmail.com >
2009-01-16 17:25:37 +00:00
Josh
7260852187
Fix date_select within fields_for with an index [ #1666 state:resolved] [Josh, Frederick Cheung]
...
Signed-off-by: Frederick Cheung <frederick.cheung@gmail.com >
2009-01-16 17:23:43 +00:00
Brandon Keepers
452cd74d81
Dup keys in OrderedHash to prevent them from being modified [ #1676 state:resolved]
...
Signed-off-by: Frederick Cheung <frederick.cheung@gmail.com >
2009-01-16 17:23:43 +00:00
Carlos Kozuszko
5ed119c005
Fix dirty handling of nullable non-integer numeric columns [ #1692 state:resolved]
...
Signed-off-by: Frederick Cheung <frederick.cheung@gmail.com >
2009-01-16 17:23:35 +00: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 Koziarski
f2ee3f20df
Fix the AR json serialization tests to comply with the earlier change to quote keys correctly
2009-01-16 17:57:45 +13:00
Michael Koziarski
0bed5bdb21
Properly quote json keys.
...
According to the RFC and the json.org site all json keys must be strings, and those strings must be quoted with double quotes.
[#1755 state:committed]
2009-01-16 17:40:04 +13:00
Nahum Wild
a53ad5bba3
Added in a local per request cache to MemCacheStore. It acts as a buffer to stop unneccessary requests being sent through to memcache [ #1653 state:resolved]
...
Signed-off-by: Joshua Peek <josh@joshpeek.com >
2009-01-15 21:29:32 -06: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
Joshua Peek
b281a6a5b2
Use Rack's MethodOverride lib [ #1699 state:resolved]
2009-01-13 17:26:29 -06:00
Joshua Peek
9775c25824
Update multipart tests to expose (another) bug in Rack's multipart parser
2009-01-13 17:21:45 -06:00
Joshua Peek
1adc1496f9
Add RewindableInput wrapper to fix issues with middleware that impolitely eat up non-rewindable input
2009-01-13 16:09:51 -06:00
Bryan Ash
5a43908c74
Explicitly read as binary in multipart_body for Windows [ #1065 state:resolved]
...
Signed-off-by: Joshua Peek <josh@joshpeek.com >
2009-01-13 14:42:43 -06:00
Cody Fauser
d3107ce3b0
Use :key instead of old :session_key in session_store.rb generator and docs [ #1746 state:resovled]
...
Signed-off-by: Joshua Peek <josh@joshpeek.com >
2009-01-13 14:27:23 -06: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
Pratik Naik
c99ef814b0
Revert "HTTP Digest authentication [ #1230 state:resolved]"
...
This reverts commit 45dee3842d .
Reasons :
1. The code is not working in it's current state
2. Should not be using exceptions for flow control
2009-01-13 16:13:42 +00:00
Pratik Naik
5339f813be
Change Object#try to raise NoMethodError on private methods and always return nil when Object is nil [Pratik Naik, Lawrence Pit]
2009-01-13 03:28:32 +00:00
Nicholas Dainty
296ca4da17
TimeWithZone#xmlschema accepts optional fraction_digits argument [ #1725 state:resolved]
2009-01-11 13:56:07 -06:00
Jeremy Kemper
f1fff0a480
Merge branch 'master' of git@github.com:rails/rails
2009-01-10 15:09:08 -08:00
Joshua Peek
18cb0493d1
Refactor request urlencoded params parsing tests
2009-01-10 16:02:03 -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
Joshua Peek
9fe69b225c
Moved query string parsing tests into the request tests folder
2009-01-10 11:39:57 -06:00
Joshua Peek
92dbf5ba83
Refactor request multipart params parsing tests
2009-01-10 11:32:38 -06:00
Joshua Peek
40a75a5091
Refactor request xml params parsing tests
2009-01-09 16:05:27 -06:00
Joshua Peek
38a723e6ea
Refactor request json params parsing tests
2009-01-09 15:43:32 -06:00
Joshua Peek
ac4bf1180a
Ensure we override Rack::Request's POST method too
2009-01-09 13:12:39 -06:00
Joshua Peek
282c1d6159
Refactor request query string parsing tests
2009-01-09 12:52:59 -06:00
Joshua Peek
e1f73aab8c
Inherit ActionController::Request from Rack::Request
2009-01-09 11:47:44 -06:00
Pratik Naik
e0fa041fce
Process time should be wall time when benchmarking
2009-01-09 16:46:24 +00:00
Jeremy Kemper
859e1508be
Fix test broken by test process changes
2009-01-07 16:37:32 -08:00
Jeremy Kemper
074414883c
Remove Content-Length header from :no_content responses
2009-01-07 15:55:28 -08:00
Jeremy Kemper
48963a55c7
Set assigns for integration tests also
2009-01-07 15:52:19 -08:00
Jeremy Kemper
347db97edd
Take care not to mix in public methods
2009-01-07 14:49:12 -08:00
Jeremy Kemper
c90572e3ab
Use instance_eval instead of adding an accessor to the class
2009-01-07 14:49:12 -08:00
Jeremy Kemper
35fa007313
Include process methods in ActionController::TestCase only. No need to alias_method_chain :process either.
2009-01-07 14:49:05 -08:00
Jeremy Kemper
0f9e65b71f
Object#tap for Ruby < 1.8.7
2009-01-07 13:19:48 -08:00
Pratik Naik
17da45b789
Fix JSON decoder date-converter regexp [ #1662 state:resolved] [Jonathan del Strother]
2009-01-07 17:51:11 +00:00
Michael Koziarski
2f92313324
Spam people with commit rights on test failures.
2009-01-07 18:18:00 +13:00
Mike Gunderloy
19818eb0ea
Update CI configuration to reflect latest gems.
2009-01-07 16:42:53 +13:00
Jeremy Kemper
8736dd3241
Fix failing flash test
2009-01-06 16:57:41 -08:00
Jeremy Kemper
851c3de5c9
Merge branch 'master' of git@github.com:rails/rails
2009-01-06 15:36:38 -08:00
Jeremy Kemper
9b96e8d1cc
Consolidate test_help requires
2009-01-06 15:36:08 -08:00
Jeremy Kemper
84194ce936
Explicitly require AS::TestCase
2009-01-06 15:35:46 -08:00
Joshua Peek
b7ea4add86
Bump Rack version to 0.9
2009-01-06 15:20:57 -06:00
Joshua Peek
ce706b4b9b
Cache AssetTag timestamps
2009-01-04 15:39:16 -06:00
gbuesing
d2a1c2778e
TimeWithZone#- gives correct result with wrapped DateTime, and with DateTime argument
2009-01-04 13:58:08 -06:00
Joshua Peek
f00e86d7e9
Memoize request accessors on the Rack env so other request objects have access to the same cache [ #1668 state:resolved]
2009-01-04 12:15:15 -06:00
Joshua Peek
ed2e776bde
Move metal above method piggybacking middleware and add some test coverage
2009-01-03 23:02:29 -06:00
Joshua Peek
f7ee082bb3
Add failing test for file uploads with unrewindable input
2009-01-02 18:46:01 -06:00
Joshua Peek
104898fcb7
Revert to the good old days when AssetTag didn't cause anyone problems
2009-01-02 13:40:23 -06:00
Laszlo Bacsi
606176a55b
Fixed call_with_exception for Routing Errors [ #1684 state:resolved]
...
Signed-off-by: Joshua Peek <josh@joshpeek.com >
2009-01-02 10:46:48 -06:00
ddemaree
f90160c6c1
Fixed bug where calling app method from console would raise ArgumentError [ #1629 state:resolved]
...
Signed-off-by: Joshua Peek <josh@joshpeek.com >
2009-01-02 10:31:21 -06:00
David Heinemeier Hansson
a1fb57aa69
Added :silence option to BenchmarkHelper#benchmark and turned log_level into a hash parameter and deprecated the old use [DHH]
2009-01-01 18:53:16 +01:00
David Heinemeier Hansson
f1e20ce9a7
Merge branch 'master' of git@github.com:rails/rails
2009-01-01 18:13:14 +01:00
David Heinemeier Hansson
49a055dff6
Fixed the AssetTagHelper cache to use the computed asset host as part of the cache key instead of just assuming the its a string [ #1299 state:committed]
2009-01-01 18:12:49 +01:00
Jeremy Kemper
a5004573d8
Only silence backtrace from plugin lib dirs
2008-12-30 18:25:44 -08:00
Jeremy Kemper
2e1132fad8
Test that exceptions raised in filters are properly rescued
2008-12-30 18:06:56 -08:00
Jeremy Kemper
c69d8c043f
Fix formatted_* deprecation message
2008-12-30 15:16:51 -08:00
Jeremy Kemper
2f9edde142
Clean trailing / after rails root from backtraces
2008-12-30 12:44:31 -08:00
Jeremy Kemper
d961592886
Merge branch 'master' of git@github.com:rails/rails
2008-12-30 12:40:32 -08:00
Pratik Naik
82443ecfad
Merge commit 'fred/pullable'
2008-12-30 17:50:17 +00:00
Mike Gunderloy
a29369ae4a
Fix named scope tests for sqlite3 [ #1667 state:resolved]
...
Signed-off-by: Pratik Naik <pratiknaik@gmail.com >
2008-12-30 03:10:11 +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
Joshua Peek
558ab327b7
Clean up view path cruft and split path implementations into Template::Path and Template::EagerPath
2008-12-29 19:27:19 -06:00
Jeremy Kemper
276ec16007
Merge branch 'master' of git@github.com:rails/rails
2008-12-29 14:38:54 -08:00
Mike Gunderloy
490c26c843
Fix failing gem dependency tests [ #1659 state:resolved]
...
Signed-off-by: Pratik Naik <pratiknaik@gmail.com >
2008-12-29 20:00:47 +00:00
Mike Gunderloy
36af857c43
Fix FCGI dispatching tests
...
Signed-off-by: Pratik Naik <pratiknaik@gmail.com >
2008-12-29 19:58:10 +00:00
Joshua Peek
c20c72e3d9
Use rack namespace for routing args
2008-12-28 15:34:59 -06:00
Joshua Peek
5d89605c11
Make router and controller classes better rack citizens
2008-12-28 15:31:03 -06:00
Joshua Peek
45dee3842d
HTTP Digest authentication [ #1230 state:resolved]
2008-12-28 15:13:16 -06:00
Joshua Peek
1f0aecd931
Allow custom rails generators to pass in their own binding to Create command so that the corresponding erb templates get rendered with the proper binding [ #1493 state:resolved]
2008-12-28 15:10:41 -06:00
Joshua Peek
1e45818a62
Allow multiple conditions for callbacks [ #1627 state:resolved]
2008-12-28 15:07:17 -06:00
Yaroslav Markin
3b92b141fd
Fix 'i18n' require broken by 0.0.1 -> 0.1.1 commit [ #1658 state:committed]
...
Signed-off-by: David Heinemeier Hansson <david@loudthinking.com >
2008-12-28 21:34:57 +01:00
Yaroslav Markin
1648df79b7
Update i18n gem to version 0.1.1 (Rails' changes were backported) [ #1635 state:committed]
...
Signed-off-by: David Heinemeier Hansson <david@loudthinking.com >
2008-12-28 21:19:27 +01: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
Xavier Noria
a2270ef259
Inline code comments for class_eval/module_eval [ #1657 state:resolved]
...
Signed-off-by: Pratik Naik <pratiknaik@gmail.com >
2008-12-28 19:49:28 +00:00
Mike Gunderloy
1fb275541a
Ensure template runner tests don't depend on hash ordering [ #1654 state:resolved]
...
Signed-off-by: Pratik Naik <pratiknaik@gmail.com >
2008-12-28 17:49:58 +00:00
Pratik Naik
fec0ea9d6d
Request#env['SERVER_NAME'] does not contain port number
2008-12-28 17:07:13 +00:00
Aaron Quint
c0c79f779c
Use SimpleLogger for Rails::TemplateRunner outside of the Generator context [ #1618 state:resolved]
...
Signed-off-by: Pratik Naik <pratiknaik@gmail.com >
2008-12-28 16:49:19 +00:00
Mark Reginald James
5138f755ff
Fixed incorrect parsing of query parameters with mixed-depth nesting inside an array [ #1622 state:resolved]
...
Signed-off-by: Frederick Cheung <frederick.cheung@gmail.com >
2008-12-28 01:15:48 +00:00
Aaron Quint
9fd35fc2d8
Adding test coverage and better logging to Rails::TemplateRunner [ #1618 state:resolved]
...
Signed-off-by: Pratik Naik <pratiknaik@gmail.com >
2008-12-27 21:03:44 +00:00
Yaroslav Markin
fdaa9ed033
Fix ActionPack build on Windows: we really should not test anything regarding symlinks on Windows.
...
Signed-off-by: Pratik Naik <pratiknaik@gmail.com >
2008-12-27 17:33:13 +00:00
Yaroslav Markin
28347d889b
Refactor ActiveRecord::Base#new_record? [ #1647 state:committed]
...
Signed-off-by: David Heinemeier Hansson <david@loudthinking.com >
2008-12-27 15:25:39 +01:00
Frederick Cheung
afdec83ed5
Fix to_sentence being used with options removed by 273c77
2008-12-27 14:16:17 +00:00
Yaroslav Markin
6e98adfc8e
ActiveRecord::Base#new_record? now returns false for existing records (was nil) [ #1219 state:committed]
...
Signed-off-by: David Heinemeier Hansson <david@loudthinking.com >
2008-12-27 14:36:11 +01:00
Yehuda Katz
4f043a4838
More optimizations on respond_to after a profile and benching:
...
App with simple respond_to:
def index
respond_to do |format|
format.html
format.xml
format.json
end
end
On JRuby (after complete hotspot warmup) -- 8% improvement:
550 requests per second after this commit
510 requests per second with old method_missing technique
On MRI (8% improvement):
430 requests per second after this commit
400 requests per second with old method_missing technique
2008-12-27 00:06:57 -08:00
Roman Shterenzon
21efba464a
Fix HasManyAssociation#create ignoring the :primary_key option [ #1633 state:resolved]
...
Signed-off-by: Frederick Cheung <frederick.cheung@gmail.com >
2008-12-27 01:10:29 +00:00
Frederick Cheung
f9cab0e503
Fix :include of has_one with :primary_key option
2008-12-26 23:26:37 +00:00
Frederick Cheung
7db1704068
Fix :include of has_many associations with :primary_key option
2008-12-26 23:17:56 +00:00
Pratik Naik
f4f8923cf0
Merge commit 'fred/pullable'
2008-12-26 21:56:21 +00:00
Yehuda Katz
6dc1288111
Remove method missing use in respond_to
2008-12-26 13:41:02 -08:00
Frederick Cheung
5cebe69e74
Preload uses exclusive scope [ #643 state:resolved]
...
With self referential associations, the scope for the the top level should not affect fetching of associations, for example
when doing
Person.male.find :all, :include => :friends
we should load all of the friends for each male, not just the male friends.
2008-12-26 18:25:55 +00:00
Pivotal Labs
eb457ceee1
Association preloading no longer stops if it hits a nil object [ #1630 state:resolved]
...
Signed-off-by: Frederick Cheung <frederick.cheung@gmail.com >
2008-12-26 18:25:50 +00:00
trans
c9d4335418
MaKe Hash#slice! return removed values, akin to Array [ #971 state:resolved]
...
Signed-off-by: Frederick Cheung <frederick.cheung@gmail.com >
2008-12-26 18:25:42 +00:00
Frederick Cheung
dce0da77e7
Fix assert_select_rjs not checking id for inserts [ #540 state:resolved]
2008-12-26 18:25:32 +00:00
Frederick Cheung
d7b6e48c70
Fix randomly failing cookie store tests
...
Marshal.dump(Marshal.load(marshaled_hash)) is not guarenteed to be equal to marshaled_hash
because of the lack of ordering of hash
2008-12-26 18:25:03 +00:00
Pratik Naik
db5a98e6cb
Merge docrails
2008-12-26 17:19:59 +00:00
Pratik Naik
07298fd092
Don't recurse when ActionController#render is called without any arguments
2008-12-26 01:49:14 +00:00
Pratik Naik
80307c8b0a
Make ActionController#render(symbol) behave same as ActionController#render(string) [ #1435 ]
2008-12-26 01:12:11 +00:00
Pratik Naik
cd1d6e8768
Make ActionController#render(string) work as a shortcut for render :action => string. [ #1435 ]
...
Examples:
# Instead of render(:action => 'other_action')
render('other_action')
Note : Argument must not have any '/'
2008-12-25 23:05:34 +00:00
Pratik Naik
d67e03871e
Make ActionController#render(string) work as a shortcut for render :template => string. [ #1435 ]
...
Examples:
# Instead of render(:template => 'controller/action')
render('controller/action')
Note : Argument must not begin with a '/', but have at least one '/'
2008-12-25 22:26:03 +00:00
Pratik Naik
061952392a
Make ActionController#render(string) work as a shortcut for render :file => string. [ #1435 ]
...
Examples:
# Instead of render(:file => '/Users/lifo/home.html.erb')
render('/Users/lifo/home.html.erb')
Note : Filename must begin with a forward slash ('/')
2008-12-25 21:43:07 +00:00
Pratik Naik
dd0753458f
Move ActionController::Base#render arguments validation to a separate method
2008-12-25 20:49:31 +00:00
Pratik Naik
04a8b2362d
Make render_test.rb run in isolation
2008-12-25 19:28:08 +00:00
Pratik Naik
6e2a771661
Undry ActionController::TestCase#<HTTP_METHODS> for better documentation
2008-12-25 17:54:44 +00:00
Pratik Naik
e898f82a74
Move request parsing related code to ActionController::RequestParser
2008-12-25 03:51:04 +00:00
Joshua Peek
9c1e48eaea
ActionController::VerbPiggybacking middleware
2008-12-23 13:36:05 -06:00
Pratik Naik
3562d54d18
Remove duplicate attr_reader :env
2008-12-23 00:36:13 +00:00
Pratik Naik
293bb02f91
Unify ActionController::AbstractRequest and ActionController::Request
2008-12-23 00:30:32 +00:00
Pratik Naik
b5ecfe78f9
Use Rack::MockRequest for TestRequest
2008-12-23 00:30:32 +00:00
Pratik Naik
7e1751111e
Rename RackRequest to Request
2008-12-23 00:30:32 +00:00
Pratik Naik
408ec6c0dc
Remove rack_process.rb
2008-12-23 00:30:32 +00:00
Pratik Naik
900aad677f
Remove deprecated relative_url_root
2008-12-23 00:30:32 +00:00
Joshua Peek
faf8364050
Defining a new method is atomic, no mutex needed.
2008-12-22 16:58:48 -06:00
Jeremy Kemper
2e053aec9b
Don't construct object deprecation proxy if unneeded
2008-12-22 14:48:45 -08:00
Joshua Peek
0b22a96b7a
Move default middleware stack to middlewares.rb
2008-12-22 12:04:32 -06:00
Joshua Peek
aa002c0e86
ActiveRecord::QueryCache middleware
2008-12-22 11:31:18 -06:00
Luis Hurtado
63aac33833
Ensure of Model#create support custom updated_at and updated_on attributes [ #1612 state:resolved]
...
Signed-off-by: Pratik Naik <pratiknaik@gmail.com >
2008-12-22 15:19:33 +00:00
Sam Oliver
70456aed31
Use I18n for date/time select helpers prompt text [ #561 state:resolved]
...
Signed-off-by: Pratik Naik <pratiknaik@gmail.com >
2008-12-22 15:13:39 +00:00
Sergio Gil
e8de7a67a5
Add :allow_nil option to delegate [ #1127 state:resolved]
...
Signed-off-by: Pratik Naik <pratiknaik@gmail.com >
2008-12-21 23:24:06 +00:00
Daniel Luz
f7bd0beb67
Ensure Model#last doesn't affects order for another finders inside the same scope [ #1499 state:resolved]
...
Signed-off-by: Pratik Naik <pratiknaik@gmail.com >
2008-12-21 23:24:06 +00:00
Sam Oliver
389534c38c
Added prompt options to date helpers [ #561 state:resolved]
...
Signed-off-by: Pratik Naik <pratiknaik@gmail.com >
2008-12-21 23:24:05 +00:00
Joshua Peek
858a420ce1
Ensure the template format is always passed to the template finder. Now we can cleanup some nasty stuff.
2008-12-21 17:24:16 -06:00
Pratik Naik
f5b7f0911b
Merge commit 'fred/more_pullable'
2008-12-21 19:04:48 +00:00
=?utf-8?q?Adam=20Cig=C3=A1nek?=
fcd58dc27a
Allow use of symbols for :type option of ActionController::Streaming#send_file/#send_data [ #1232 state:resolved]
...
Signed-off-by: Frederick Cheung <frederick.cheung@gmail.com >
2008-12-21 18:58:55 +00:00
pfagiani
7cda0df7f1
Fix script/dbconsole not handling numeric password [ #1395 state:resolved]
...
Signed-off-by: Frederick Cheung <frederick.cheung@gmail.com >
2008-12-21 16:48:02 +00:00
Pratik Naik
fab4f96bf2
Correct description of tmp:create task [ #1607 state:resolved] [Roderick van Domburg]
2008-12-21 16:10:26 +00:00
Frederick Cheung
b17b9371c6
Fix configure_dependency_for_has_many not quoting conditions properly [ #1461 state:resolved]
2008-12-21 15:57:48 +00:00
Frederick Cheung
6f4b2469fb
Use explicit order to stop test failing randomly
2008-12-21 15:57:21 +00:00
Frederick Cheung
cf9c36834a
Fix failing cookie store test
2008-12-21 15:57:09 +00:00
Frederick Cheung
40247a8cbb
Remove observe_field :on option as prototype no longer supports it [ #1088 state:resolved]
2008-12-21 15:55:52 +00:00
Yaroslav Markin
276ea48de9
Remove dead commented out code [ #1467 state:resolved]
...
Signed-off-by: Frederick Cheung <frederick.cheung@gmail.com >
2008-12-21 15:55:42 +00:00
Joshua Peek
3b317b7100
Switch to Rack::Response#set_cookie instead of using CGI::Cookie to build cookie headers
2008-12-20 21:25:47 -06:00
Frederick Cheung
606cd61b9a
Fix Mime::Type#=~ not using Regexp.quote
...
Signed-off-by: Pratik Naik <pratiknaik@gmail.com >
2008-12-21 02:24:22 +00:00
Karthik Krishnan
75a133f92f
Fix has many through not quoting table names [ #1163 state:resolved]
...
Signed-off-by: Frederick Cheung <frederick.cheung@gmail.com >
2008-12-20 21:08:51 +00:00
Emilio Tagua
c092dbef50
Add missing fixture to allow reload models test to run isolated [ #1609 state:resolved]
...
Signed-off-by: Pratik Naik <pratiknaik@gmail.com >
2008-12-20 20:39:25 +00:00
Matt Bauer
7b249b67e9
Fix reset_session with lazy cookie stores [ #1601 state:resolved]
...
Signed-off-by: Joshua Peek <josh@joshpeek.com >
2008-12-20 14:37:51 -06:00
Pratik Naik
462c75b60c
Fix duplicate test name [ #1058 state:resolved] [Dave Rothlisberger, Pratik Naik]
2008-12-20 18:08:54 +00:00
Joshua Peek
fda62ecf70
Rename AbstractResponse to Response and inheirt from Rack::Response
2008-12-19 17:15:22 -06:00
Joshua Peek
a14bbd7a85
Process CGI 'cookie' header into 'Set-Cookie' for all responses.
...
This mostly affects response.headers['cookie'] for test requests. Use response.cookies instead.
2008-12-19 16:49:06 -06:00
Joshua Peek
cbee72d216
Improve cookie test coverage
2008-12-19 16:35:23 -06:00
Joshua Peek
3da1b94d07
Use status response accessor instead of the 'Status' header
2008-12-19 15:05:51 -06:00
Joshua Peek
12e416a04b
Diverge Metal implementation from Rack::Cascade since we want the last app to return its headers and body if the status is a 404.
2008-12-19 11:07:25 -06:00
Pratik Naik
c3f53f412c
Merge docrails
2008-12-19 14:27:43 +00:00
Pratik Naik
89b7581404
Add repair_helper.rb file I forgot in previous commit 8a92cd
2008-12-19 13:52:21 +00:00
Murray Steele
8a92cdc863
Add a repair_helper to repair changes to the validations inside validations_test.rb [ #674 state:resolved]
...
Many of the tests in validations_test would add a new validation to
models. However, only Topic was being reset with a fairly aggressive
clearing of all validations. None of the other models being used however
were recieving the same treatment. Now we use repair_validations(Topic)
for the whole test case because most test cases use Topic and then the
block form of repair_validations(<other_models>) inside any tests that use
other models.
Signed-off-by: Pratik Naik <pratiknaik@gmail.com >
2008-12-19 13:37:50 +00:00
Pratik Naik
c044c079ab
Revert "Auto-load template handlers based on unmatched extensions [ #1540 state:resolved]"
...
This reverts commit e8c1915416 .
Reasons :
- ActionPack tests run very slow
- Gem.searcher hanging for long time when extension is nil
2008-12-19 13:05:45 +00:00
Jeremy Kemper
6ce4b43035
Cheaper metal cascade
2008-12-18 16:55:03 -08:00
Jeremy Kemper
03f6ecc6c6
Use LogTailer
2008-12-18 16:53:53 -08:00
Jeremy Kemper
248391a7e1
Merge branch 'master' of git@github.com:rails/rails
2008-12-18 14:49:02 -08:00
Jeremy Kemper
86abd6887d
Ensure rack.multithread is set back to original value. Accept external lock.
2008-12-18 14:48:53 -08:00
Jeremy Kemper
788ab8458a
No need to dup immutable options
2008-12-18 14:42:58 -08:00
Jeremy Kemper
c81cd321d1
Be sure to call super
2008-12-18 14:42:39 -08:00
Jeremy Kemper
a10e473b81
Rename Rails::Rack::Logger -> LogTailer. Speed up log mtime checks.
2008-12-18 14:42:06 -08:00
Jeremy Kemper
6703f909c7
Cheaper log tail time comparison
2008-12-18 14:17:43 -08:00
Matt Jones
a9422cc1db
Fix preloading of has_one :through associations on belongs_to [ #1507 state:resolved]
...
Signed-off-by: Frederick Cheung <frederick.cheung@gmail.com >
2008-12-18 19:19:36 +00:00
Manfred Stienstra
8326b95169
Free MySQL::Result objects after a call to execute [ #1416 state:resolved]
...
No freeing Result objects causes the MySQL driver to free result sets
at undefined times, this can lead to erratic performance in your
application.
Signed-off-by: Frederick Cheung <frederick.cheung@gmail.com >
2008-12-18 19:19:36 +00:00
Frederick Cheung
9c7fe7c672
Don't include table_name twice
2008-12-18 19:19:36 +00:00
Frederick Cheung
c9ab7098be
Ensure :include checks joins when determining if it can preload [ #528 state:resolved]
2008-12-18 19:19:36 +00:00
Emilio Tagua
9cf6b1b15e
Add missing model files so tests can run isolated [ #1506 state:resolved]
...
Signed-off-by: Frederick Cheung <frederick.cheung@gmail.com >
2008-12-18 19:19:36 +00:00
Frederick Cheung
707d0dd3e1
Fix preloading of belongs_to with null foreign key generating useless query [ #1027 state:resolved]
2008-12-18 19:19:35 +00:00
Frederick Cheung
428e77bf0f
Make exceptions raise from find_by_foo! have a more helpful message [ #1567 state:resolved]
2008-12-18 19:19:35 +00:00
Joshua Peek
a9fde9a2ab
Cleanup dispatch path
2008-12-18 13:14:09 -06:00
Joshua Peek
3b35366d5d
Use more generic test env flag
2008-12-18 12:57:37 -06:00
Joshua Peek
2e22c7fda0
Conditionally inject session middleware instead of using session management
2008-12-18 12:56:18 -06:00
Joshua Peek
2eb2ec9e63
Move gaint lock into middleware
2008-12-18 12:00:54 -06:00
Lourens Naude
3ff6b00ee3
Persistent session identifier support for CookieSessionStore and API compat. with the server side stores [ #1591 state:resolved]
...
Signed-off-by: Joshua Peek <josh@joshpeek.com >
2008-12-18 11:33:53 -06:00
Brady Bouchard
33f76bb25a
Ensure error file is sent with a 'text/html' content type [ #1478 state:resolved]
...
Signed-off-by: Joshua Peek <josh@joshpeek.com >
2008-12-17 10:23:59 -06:00
Joshua Peek
f23c2796ee
When checking for the wrong routing method, ensure the environment is passed to recognize optimize [ #1406 state:resolved]
2008-12-17 10:20:19 -06:00
Joshua Peek
175cb7a963
Fix metal tests
2008-12-17 10:10:24 -06:00
Joshua Peek
61a41154f7
Make generated Metal bits a pure rack endpoint application (not middleware)
...
Instead of calling super to pass the request on, return a 404.
The modified app looks like this:
# app/metal/poller.rb
class Poller
def self.call(env)
if env["PATH_INFO"] =~ /^\/poller/
[200, {"Content-Type" => "text/html"}, "Hello, World!"]
else
[404, {"Content-Type" => "text/html"}, "Not Found"]
end
end
end
But you aren't locked in to just Rails:
# app/metal/api.rb
require 'sinatra'
Sinatra::Application.default_options.merge!(:run => false, :env => :production)
Api = Sinatra.application unless defined? Api
get '/interesting/new/ideas' do
'Hello Sinatra!'
end
2008-12-17 09:53:56 -06:00
Jesse Newland
97a178bfa4
Decorate responses from Rack Middleware and Rails Metal for the purposes of integration testing. A test for the following Metal:
...
class Poller < Rails::Rack::Metal
def call(env)
if env["PATH_INFO"] =~ /^\/poller/
[200, {"Content-Type" => "text/plain"}, "Hello World!"]
else
super
end
end
end
might be tested like so:
class PollerTest < ActionController::IntegrationTest
test "poller returns hello world" do
get "/poller"
assert_response 200
assert_response :success
assert_response :ok
assert_equal "Hello World!", response.body
end
end
[#1588 state:committed]
Signed-off-by: David Heinemeier Hansson <david@loudthinking.com >
2008-12-17 15:59:47 +01:00
Joshua Peek
1bcfce0130
Remove set_cookie hack from rack response since we dont use cgi sessions anymore
2008-12-16 20:21:27 -06:00
Joshua Peek
246b582ddf
Remove CGI::Session memory leak patch
2008-12-16 19:56:09 -06:00
Joshua Peek
ec1bd98705
Session Fixation tests have been rolled into the session cookie tests
2008-12-16 16:28:39 -06:00
Joshua Peek
8c3a543664
Introduce Rails Metal
...
# app/metal/poller.rb
class Poller < Rails::Rack::Metal
def call(env)
if env["PATH_INFO"] =~ /^\/poller/
[200, {"Content-Type" => "application/json"}, Message.recent.to_json]
else
super
end
end
end
* There is a generator to help you get started
`script/generate metal poller`
* Also, metal bits can be ran standalone with rackup
`rackup app/metal/poller.rb`
2008-12-16 13:15:06 -06:00
Daniel Luz
c4023cbe20
Update documentation for default_scope
...
Signed-off-by: David Heinemeier Hansson <david@loudthinking.com >
2008-12-16 14:34:02 +01:00
Xavier Noria
46c7dd2348
normalize author names in changelogs [ #1495 state:committed]
...
Signed-off-by: David Heinemeier Hansson <david@loudthinking.com >
2008-12-16 14:33:32 +01:00
Hongli Lai (Phusion
9e2b4a10f7
Do not output an ETag header if response body is blank or when sending files with send_file(... :xsendfile => true) [ #1578 state:committed]
...
Signed-off-by: David Heinemeier Hansson <david@loudthinking.com >
2008-12-16 12:30:28 +01:00
Joshua Peek
7c09050999
Lazy load flash access
2008-12-16 01:00:48 -06:00
Joshua Peek
9a733f6c64
Don't write nil values to default session options hash
2008-12-16 00:04:04 -06:00
Joshua Peek
95c839bd2a
Session objects are always a hash, so we need to ensure a flash hash is always assigned to the session
2008-12-15 20:43:01 -06:00
Jeremy Kemper
89056885b0
Merge branch 'master' of git@github.com:rails/rails
2008-12-15 18:22:35 -08:00
Jeremy Kemper
19be3d35b3
Revert "Make constantize look into ancestors"
...
[#410 state:open]
This reverts commit 262fef7ed5 .
2008-12-15 18:20:18 -08:00
Joshua Peek
43ac42c46a
Clear empty nil values in session hash before saving
2008-12-15 19:25:31 -06:00
Joshua Peek
ed70830713
Switch to Rack based session stores.
2008-12-15 16:33:31 -06:00
Nathan Weizenbaum
e8c1915416
Auto-load template handlers based on unmatched extensions [ #1540 state:resolved]
...
Signed-off-by: Joshua Peek <josh@joshpeek.com >
2008-12-15 14:49:38 -06:00
Hongli Lai (Phusion)
a392f34fb4
Require mocha >= 0.9.3, older versions don't work anymore [ #1579 state:resolved]
...
Signed-off-by: Joshua Peek <josh@joshpeek.com >
2008-12-15 14:47:19 -06:00
Jeremy Kemper
0d48408dcc
Merge branch 'master' of git@github.com:rails/rails
2008-12-15 11:05:29 -08:00
Frederick Cheung
262fef7ed5
Make constantize look into ancestors
...
[#410 state:resolved]
Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net >
2008-12-15 11:01:04 -08:00
Seth Fitzsimmons
4966076d35
Use Mime::JS in place of explicit 'text/javascript' [ #1573 state:resolved]
...
Signed-off-by: Joshua Peek <josh@joshpeek.com >
2008-12-15 12:18:45 -06:00
Seth Fitzsimmons
f36dafa492
Implement Mime::Type.=~ to match all synonyms against arg [ #1573 state:resolved]
...
Signed-off-by: Joshua Peek <josh@joshpeek.com >
2008-12-15 12:00:55 -06:00
Frederick Cheung
7c18518105
Properly parenthasize calls to defined?(Rails) in 75fa82418 [ #1563 state:resolved]
...
Signed-off-by: Joshua Peek <josh@joshpeek.com >
2008-12-15 11:49:08 -06:00
Dan Pickett
38412ecb5d
Fixed ActionView::TestCase current url context [ #1561 state:resolved]
...
Signed-off-by: Joshua Peek <josh@joshpeek.com >
2008-12-15 11:47:39 -06:00
David Heinemeier Hansson
07326b38ec
Merge branch 'master' of git@github.com:rails/rails
2008-12-15 15:37:47 +01:00
David Heinemeier Hansson
f9a02b12d1
Added gem backtrace pretty priting (Juan Lupión) [ #1497 state:committed]
2008-12-15 15:37:27 +01:00
Frederick Cheung
4dcd8f01af
Make delete_if/reject faster and fix other mutators
...
[#1559 state:committed]
Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net >
2008-12-15 15:34:29 +01:00
Frederick Cheung
6eed6cf5c6
Make delete_if/reject faster and fix other mutators
...
[#1559 state:committed]
Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net >
2008-12-12 10:19:07 -08:00
mark
49306ccacf
Add :partial option to assert_template [ #1550 state:resolved]
...
Signed-off-by: Joshua Peek <josh@joshpeek.com >
2008-12-11 11:06:35 -06:00
Frederick Cheung
5ede4ce188
Fixed session related memory leak [ #1558 state:resolved]
...
Signed-off-by: Joshua Peek <josh@joshpeek.com >
2008-12-11 10:20:33 -06:00
Joshua Peek
7cfa6c535b
Fixed template lookups from outside the rails root [ #1557 state:resolved]
2008-12-11 10:17:29 -06:00
Eloy Duran
7394d12dc7
Fixed ActiveSupport::OrderedHash #delete_if, #reject!, and #reject, which did not sync the @keys after the operation.
...
This probably holds true for other mutating methods as well.
Signed-off-by: Michael Koziarski <michael@koziarski.com >
2008-12-11 14:32:20 +01:00
Christos Zisopoulos
69387ce016
Fix for Integration::Session follow_redirect! headers['location'] bug with Rack [ #1555 state:resolved]
...
Signed-off-by: Joshua Peek <josh@joshpeek.com >
2008-12-10 18:38:28 -06:00
Joshua Peek
75fa82418d
Prefer Rails.logger over RAILS_DEFAULT_LOGGER
2008-12-10 18:08:14 -06:00
Frederick Cheung
455c7f9e37
Don't use the transaction instance method so that people with has_one/belongs_to :transaction aren't fubared
...
[#1551 state:committed]
Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net >
2008-12-10 15:11:42 -08:00
Frederick Cheung
9f69ff12d4
Squash memory leak when calling flush with an empty buffer
...
[#1552 state:committed]
Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net >
2008-12-10 15:07:34 -08:00
Jeremy Kemper
d45e2c733d
Merge branch 'master' of git@github.com:rails/rails
2008-12-10 14:53:18 -08:00
Jeremy Kemper
b30ae19748
Revert "Fix: counter_cache should decrement on deleting associated records."
...
[#1196 state:open]
This reverts commit 05f2183747 .
2008-12-10 14:48:12 -08:00
Bruce Krysiak
aa5cdb0d47
Added a :camelize option to ActiveRecord and Hash to_xml serialization and from_xml deserialization
...
Signed-off-by: Michael Koziarski <michael@koziarski.com >
2008-12-10 20:28:05 +01:00
Emilio Tagua
96b815d7e8
Fix test names collision.
...
[#1549 state:committed]
Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net >
2008-12-10 11:10:22 -08:00
Jeremy Kemper
9539543026
Add ActiveRecord::VERSION autoload
2008-12-10 11:01:04 -08:00
Jeremy Kemper
e4c0163f32
Fix ActionController autoloads
2008-12-10 11:00:44 -08:00
Emilio Tagua
05f2183747
Fix: counter_cache should decrement on deleting associated records.
...
[#1195 state:committed]
Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net >
2008-12-10 10:59:52 -08:00
Frederick Cheung
355f41d8aa
Rework ActiveSupport::OrderedHash to make lookups faster
...
[#1352 state:committed]
Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net >
2008-12-10 09:07:47 -08:00
Joshua Peek
014b7994ac
Explicitly require ERB Utils extensions from TagHelper
2008-12-09 14:13:33 -06:00
Jeremy Kemper
bf2532616e
Merge branch 'master' of git@github.com:rails/rails
...
Conflicts:
activesupport/CHANGELOG
2008-12-09 11:54:54 -08:00
Jeremy Kemper
781e29be0a
Fix tests broken by switch to Pathname
2008-12-09 11:39:45 -08:00
Jeremy Kemper
e8c4939fb3
Benchmark.ms
2008-12-09 11:17:11 -08:00
Jeremy Kemper
c3fe6ebbfa
How'd that sneak in there?
2008-12-09 11:16:30 -08:00
David Heinemeier Hansson
e54f17920f
Updated included memcache-client to the 1.5.0.5 version which includes fixes from fiveruns and 37signals to deal with failover and timeouts (Joshua Sierles) [ #1535 state:committed]
...
Signed-off-by: David Heinemeier Hansson <david@loudthinking.com >
2008-12-09 11:13:56 +01:00
Jeremy Kemper
9adcf951ea
Fix failing test introduced by optional-format routes
2008-12-08 19:19:48 -08:00
Jeremy Kemper
39de112e7b
Use full path to environment
2008-12-08 19:14:07 -08:00
Hongli Lai (Phusion)
13c6c3cfc5
Merge commit 'origin/master' into savepoints
2008-12-09 01:38:17 +01:00
Jason Cheow
4e60eebae0
Add ActiveSupport::Multibyte::Chars#ord method so that it returns correct Unicode value instead of falling back on String#ord in CoreExtensions, which is not multibyte compatible
...
[#1483 state:committed]
Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net >
2008-12-08 16:02:57 -08:00
Jeremy Kemper
9b22e56d89
Changelog entry for #1294
2008-12-08 15:59:42 -08:00
Jeremy Kemper
e631c5daca
Changelog entry for #1397
2008-12-08 15:57:36 -08:00
Akira Matsuda
c3b87dd4c9
Make word separator in AR validation error messages configurable.
...
[#1294 state:committed]
Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net >
2008-12-08 15:55:02 -08:00
Akira Matsuda
273c770011
Change Array#to_sentence I18n options to pass comma and space character from outside.
...
[#1397 state:committed]
Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net >
2008-12-08 15:53:20 -08:00
Ben Symonds
091e6f791a
Change field_changed? method to handle the case where a nullable integer column is changed from 0 to '0'
...
[#1530 state:committed]
Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net >
2008-12-08 15:42:13 -08:00
Joshua Peek
ebec9d43e2
Make integration test runner more Rack friendly and clean out old CGI cruft
2008-12-08 12:33:16 -06:00
Sergio Gil
e4eadf3910
Fix message when running TemplateRunner#git. [ #1526 state:resolved]
...
Signed-off-by: Pratik Naik <pratiknaik@gmail.com >
2008-12-08 00:26:49 +00:00
Pratik Naik
f7f113610e
Add a rake task to apply a template to an existing application.
...
Example : rake rails:template LOCATION=~/template.rb
2008-12-07 03:40:23 +01:00
Pratik Naik
2dc5d12c91
Remove unused TemplateRunner attributes
2008-12-07 03:28:39 +01:00
Pratik Naik
dbbae5e00e
Merge with docrails
2008-12-07 03:27:53 +01:00
Peter Cooper
9eca588bdf
Added support for plugins to be installed as submodules with the application templater. [ #1517 state:resolved]
...
Signed-off-by: Pratik Naik <pratiknaik@gmail.com >
2008-12-06 00:01:42 +01:00
Joshua Peek
731dcd8404
Silence server backtrace in rescue templates and log files. Also remove some noise from missing template errors.
2008-12-05 11:24:28 -06:00
Joshua Peek
9c9da6c892
Boot out CGI Processor.
...
* Add ActionController::CGIHandler as a backwards compatible CGI wrapper around Rack.
* Also pull failsafe responder into ActionController::Failsafe middleware.
2008-12-04 20:39:36 -06:00
Joshua Peek
27ebfd795f
Ensure route set is cleared on teardown
2008-12-04 19:10:52 -06:00
Joshua Peek
148aff2097
Set template_format to html inside rjs templates so renders within it default to html.
2008-12-04 17:20:51 -06:00
Sam Stephenson
ab211bf592
Fix rendering html partials from an rjs template
...
Signed-off-by: Joshua Peek <josh@joshpeek.com >
2008-12-04 16:35:13 -06:00
Mike Ferrier
566a3dce67
Make NoMethodError message more descriptive when an undefined message has been sent to an association [ #1515 state:resolved]
...
Signed-off-by: Joshua Peek <josh@joshpeek.com >
2008-12-04 13:31:18 -06:00
Joshua Peek
b2ad3029cd
Ensure each rack request has its own dispatcher instance
2008-12-04 11:03:16 -06:00
Joshua Peek
40e9ba1e46
Refactor SessionFixationTest and WebServiceTest with IntegrationTest so they are compatible with the Rack interface.
2008-12-04 09:43:06 -06:00
Jeremy Kemper
57f0b9738e
Remove config dir from the load path
2008-12-03 21:46:36 -06:00
Pratik Naik
e52affb210
Add :env and :sudo options to TemplateRunner#rake.
...
Examples :
rake("gems:install", :sudo => true)
rake("db:migrate", :env => "production")
2008-12-04 01:08:36 +01:00
Pratik Naik
ef0b1cbb1b
Make TemplateRunner#generate accept any number of arguments
2008-12-03 22:05:54 +01:00
Joshua Peek
7c0dfa35db
Register bogus template handlers for ActionMailer test fixtures
2008-12-03 13:58:47 -06:00
Hongli Lai (Phusion)
ccb96f2297
Merge commit 'origin/master' into savepoints
...
Conflicts:
activerecord/lib/active_record/fixtures.rb
activerecord/test/cases/defaults_test.rb
2008-12-03 19:30:35 +01:00
Joshua Peek
761a633a9c
Add Memoizable#flush_cache to clear the cache of a specific method [ #1505 state:resolved]
2008-12-03 10:57:35 -06:00
Joshua Peek
2fc6c7dd05
Validate template extensions [ #1187 state:resolved]
2008-12-03 10:57:35 -06:00
Jeremy Kemper
99f2cb4918
Merge branch 'master' of git@github.com:rails/rails
2008-12-03 10:32:30 -06:00
Jeremy Kemper
0b4858cf38
Require rack/utils explicitly
2008-12-03 10:23:58 -06:00
Jeremy Kemper
3db59ce0dc
Unnecessary CGI require
2008-12-03 10:23:43 -06:00
Jeremy Kemper
f54ae9a997
Fix failsafe response path. [ #1504 state:committed]
2008-12-03 10:23:02 -06:00
Joshua Peek
1e1056f643
Removed deprecated register_template_extension
2008-12-02 20:26:32 -06:00
Pratik Naik
be75cb8877
Remove docs for TemplateRunner#gem as the behaviour has been changed
2008-12-02 19:48:25 +01:00
Jeremy McAnally
e8cc4b116c
Add "-m/--template" option to Rails generator to apply template to generated application.
...
Signed-off-by: Pratik Naik <pratiknaik@gmail.com >
2008-12-02 19:39:11 +01:00
miloops
2014d9141a
Make new_record? an alias of new? in ActiveResource to fix problem with route generation in forms.
...
Signed-off-by: Michael Koziarski <michael@koziarski.com >
2008-12-02 15:27:16 +01:00
David Heinemeier Hansson
bf024b6a11
Github comments are an excellent way to perform community code review -- keep it up!
2008-12-01 23:06:29 -06:00
Aliaksey Kandratsenka
a0bc480e1d
establish mysql connection before dropping database
...
Signed-off-by: Michael Koziarski <michael@koziarski.com >
[#63 state:committed]
2008-12-01 21:38:30 +01:00
Michael Koziarski
a8fc494dbb
Manually load the DB config rather than firing the whole initializer [Gerrit Kaiser]
2008-12-01 21:38:30 +01:00
Joshua Peek
06ed8e4511
Add internal middleware stack to Dispatcher
...
config.middleware.use Rack::Cache
2008-12-01 13:49:34 -06:00
Matt Jones
3c07a8828e
handle missing dependecies in gem loading
...
Signed-off-by: Michael Koziarski <michael@koziarski.com >
2008-12-01 20:42:46 +01:00
Darren Boyd
0a4a5f3129
Making the IP Spoofing check in AbstractRequest#remote_ip configurable.
...
Certain groups of web proxies do not set these values properly. Notably,
proxies for cell phones, which often do not set the remote IP information
correctly (not surprisingly, since the clients do not have an IP address).
Allowing this to be configurable makes it possible for developers to choose
to ignore this simple spoofing check, when a significant amount of their
traffic would result in false positives anyway.
Signed-off-by: Michael Koziarski <michael@koziarski.com >
[#1200 state:committed]
2008-12-01 20:40:18 +01:00
miloops
97403ad5fd
Add :having option to find, to use in combination with grouped finds. Also added to has_many and has_and_belongs_to_many associations.
...
Signed-off-by: Michael Koziarski <michael@koziarski.com >
[#1028 state:committed]
2008-12-01 20:22:31 +01:00
Foliosus
0c4ba90aa1
Removed extra 'as' in :joins clause for habtm preloading
...
Signed-off-by: Michael Koziarski <michael@koziarski.com >
[#1405 state:committed]
2008-12-01 20:00:19 +01:00
Tekin Suleyman
dab78e55cf
Ensure ActionMailer doesn't blow up when a two argument proc is set for the asset host
...
Signed-off-by: Michael Koziarski <michael@koziarski.com >
[#1394 state:committed]
2008-12-01 19:38:25 +01:00
Andrew Kaspick
bda55f82c6
allow options to be passed to email address auto generation
...
Signed-off-by: Michael Koziarski <michael@koziarski.com >
[#1418 state:committed]
2008-12-01 19:27:03 +01:00
Joshua Peek
25f6524b89
opps, inner_app is in the wrong conditional
2008-12-01 12:24:02 -06:00
Joshua Peek
61958032d3
Generate rackup dispatcher with rails:update:generate_dispatchers
2008-12-01 12:21:18 -06:00
Joshua Peek
725928854d
fix failing railties test
2008-12-01 12:12:57 -06:00
Joshua Peek
926844e869
Switch FCGI handler over to Rack
2008-12-01 11:54:32 -06:00
David Heinemeier Hansson
119a41e21d
Merge branch 'master' of git@github.com:rails/rails
2008-11-30 20:06:41 -06:00
Jeremy Kemper
eb5e6fe713
Simplify Request#path
2008-11-30 17:24:36 -08:00
Jeremy Kemper
4fabc9b2f3
Simplify REMOTE_ADDR parsing
2008-11-30 17:06:11 -08:00
Jeremy Kemper
93456a2ed2
Deprecated formatted_polymorphic_url
2008-11-30 17:04:24 -08:00
David Heinemeier Hansson
3b3c0507e2
Extracted the process scripts (inspector, reaper, spawner) into the plugin irs_process_scripts [DHH]
2008-11-30 16:23:20 -06:00
David Heinemeier Hansson
be140e8c6b
Changed Rails.root to return a Pathname object (allows for Rails.root.join("app", "controllers") => "#{RAILS_ROOT}/app/controllers") [ #1482 ]
2008-11-30 15:59:30 -06:00
David Heinemeier Hansson
668872efd8
Add restart notice where missing
2008-11-30 15:54:44 -06:00
David Heinemeier Hansson
6e66e7d646
Even more polish of the default configration files and split off the session store configuration into its own file
2008-11-30 15:53:21 -06:00
David Heinemeier Hansson
c5f461d7b0
Cleanup the app generator
2008-11-30 15:52:50 -06:00
David Heinemeier Hansson
73213f4ca7
Say it briefly
2008-11-30 15:18:46 -06:00
David Heinemeier Hansson
6358e6c107
More organization based on priority
2008-11-30 15:06:55 -06:00
David Heinemeier Hansson
471f024018
Me loves me some whitespace
2008-11-30 14:58:42 -06:00
David Heinemeier Hansson
201b64b4e1
Cleanup other examples and wording
2008-11-30 14:53:22 -06:00
David Heinemeier Hansson
0eac9daa0a
Rails::Configuration never had more details. Stop lying about it
2008-11-30 14:46:11 -06:00
David Heinemeier Hansson
5c26b2e47b
Its no longer common to run Rails in environments where you cant set the environment to be the production one. Dont need a notice telling about the ENV var that prominently any more
2008-11-30 14:44:56 -06:00
Jeremy Kemper
cfb2126726
Load app initializers by path relative to Rails.root
2008-11-29 20:06:49 -08:00
Jeremy Kemper
635e2ccd3e
Extract named_helper module_eval so it's easier to override
2008-11-29 19:32:13 -08:00
Jeremy Kemper
9e4621d6f7
Merge branch 'master' of git@github.com:rails/rails
2008-11-29 19:23:31 -08:00
Jeremy Kemper
8521cebbad
Turn on debugger autoeval
2008-11-29 16:55:02 -08:00
Sven Fuchs
1182658e76
Make sure #compute_public_path caching allows to return different results for different given sources [ #1471 state:resolved]
...
Signed-off-by: Joshua Peek <josh@joshpeek.com >
2008-11-29 16:03:44 -06:00
Joshua Peek
cec8a92a6d
Merge branch 'master' of git@github.com:rails/rails
2008-11-29 15:59:47 -06:00
David Heinemeier Hansson
fdfcdf4673
Enhanced Rails.root to take parameters that'll be join with the root, like Rails.root('app', 'controllers') => File.join(Rails.root, 'app', 'controllers') [ #1482 state:committed] (Damian Janowski)
2008-11-29 10:57:36 +01:00
David Heinemeier Hansson
1e8f9634f6
Include Rack in the server noise
2008-11-29 10:45:52 +01:00
David Heinemeier Hansson
50f428661a
Merge branch 'master' of git@github.com:rails/rails
2008-11-29 10:45:30 +01:00
David Heinemeier Hansson
34905673a3
Revert "Super lazy load view paths in development mode (no indexing or caching at all). Switch layout finders to use view path api to take advantage of cache." as it killed dev mode reloading.
...
This reverts commit 4d910b0333 .
2008-11-29 10:45:06 +01:00
Joshua Peek
9fccf72725
fixed template recompile issue with previous commit and add some better tests so we can make sure it doesn't happen again
2008-11-28 14:31:54 -06:00
Joshua Peek
9fc23745f1
Reinstate "Super lazy load view paths in development mode (no indexing or caching at all). Switch layout finders to use view path api to take advantage of cache." as it killed dev mode reloading."
2008-11-28 11:18:28 -06:00
David Heinemeier Hansson
5fa0457542
Revert "Super lazy load view paths in development mode (no indexing or caching at all). Switch layout finders to use view path api to take advantage of cache." as it killed dev mode reloading.
...
This reverts commit 4d910b0333 .
2008-11-27 21:04:24 +01:00
David Heinemeier Hansson
6fa9957e0e
Merge branch 'master' of git@github.com:rails/rails
2008-11-27 18:59:33 +01:00
David Heinemeier Hansson
f2ee056873
Added view path support for engines [DHH]
2008-11-27 18:59:24 +01:00
David Heinemeier Hansson
229f959d15
Added the option to declare an asset_host as an object that responds to call (see http://github.com/dhh/asset-hosting-with-minimum-ssl for an example) [DHH]
2008-11-27 17:51:33 +01:00
Joshua Peek
4d910b0333
Super lazy load view paths in development mode (no indexing or caching at all). Switch layout finders to use view path api to take advantage of cache.
2008-11-26 20:54:47 -06:00
Jeremy Kemper
9d2002a12a
Merge branch 'master' of git@github.com:rails/rails
2008-11-26 18:00:25 -08:00
Jeremy Kemper
2c43a6429e
Ruby 1.9 compat: no Unicode normalization support yet
2008-11-26 17:59:35 -08:00
Jeremy Kemper
51e15a60b0
Ruby 1.9 compat: CGI#escape_skipping_slashes
2008-11-26 17:59:09 -08:00
Jeremy Kemper
5fa8c3b6db
MiniTest::Unit#method_name alias for Test::Unit compat
2008-11-26 17:20:05 -08:00
Jeremy Kemper
9880baa90b
Ensure Test::Unit::Assertions is available
2008-11-26 17:18:50 -08:00
David Heinemeier Hansson
3cc9d1c5ad
Let all plugins not just engines have a config/routes.rb file
2008-11-26 20:30:21 +01:00
David Heinemeier Hansson
7d8f9ef051
Fix routing test and add changelog note about draw no longer clearing the route set
2008-11-26 20:26:55 +01:00
David Heinemeier Hansson
e2362babdf
Merge branch 'master' of git@github.com:rails/rails
2008-11-26 20:04:00 +01:00
David Heinemeier Hansson
4999d52e08
Added that config/routes.rb files in engine plugins are automatically loaded (and reloaded when they change in dev mode) [DHH]
2008-11-26 20:03:25 +01:00
David Heinemeier Hansson
40b40c4870
Added support for multiple routes files and made draw not clear the map so they can be additive
2008-11-26 15:57:36 +01:00
Paul
9a4d557713
Ensure hash conditions on referenced tables are considered when eager loading with limit/offset. [ #1404 state:resolved]
...
Signed-off-by: Pratik Naik <pratiknaik@gmail.com >
2008-11-26 15:25:39 +01:00
Pratik Naik
17940a82e8
Don't re-require 'rexml/document'
2008-11-26 15:01:59 +01:00
Christoffer Sawicki
05a938c5f7
Added ActiveSupport::OrderedHash#each_key and ActiveSupport::OrderedHash#each_value [ #1410 state:resolved]
...
Signed-off-by: Pratik Naik <pratiknaik@gmail.com >
2008-11-26 14:54:35 +01:00
David Heinemeier Hansson
63d8f56774
Added app/[models|controllers|helpers] to the load path for plugins that has an app directory (go engines ;)) [DHH]
2008-11-26 14:41:20 +01:00
Jeremy Kemper
133c349b0a
Merge branch 'master' of git@github.com:rails/rails
2008-11-26 02:05:53 -08:00
Jeremy Kemper
a88094fd7a
No need to have #generate and #generate_extras per instance
2008-11-26 02:05:28 -08:00
Aaron Batalion
fef6c32afe
Added optimal formatted routes to rails, deprecating the formatted_* methods, and reducing routes creation by 50% [ #1359 state:committed]
...
Signed-off-by: David Heinemeier Hansson <david@loudthinking.com >
2008-11-26 10:52:05 +01:00
Jeremy Kemper
6599dd907f
Simpler and clearer to just explicitly require the JSON encoders
2008-11-26 01:08:37 -08:00
Jeremy Kemper
44216d5776
Autoload ActiveSupport::XmlMini
2008-11-26 00:35:55 -08:00
Jeremy Kemper
f4cae89da9
Require as little of REXML as possible to apply the entity_expansion_limit fix
2008-11-26 00:32:26 -08:00
Jeremy Kemper
27dbc27c41
Lazy-require CGI for Object#to_query
2008-11-26 00:31:55 -08:00
Jeremy Kemper
ad93212f79
Rename use_transactional_fixtures? so it doesn't collide with the superclass_delegating_accessor's query method
2008-11-25 23:50:57 -08:00
Jeremy Kemper
b7fef2610b
Extract XmlMini. Namespace FileLike extension.
2008-11-25 23:37:10 -08:00
Jeremy Kemper
d1213fa402
Rescue OpenSSL::Cipher::CipherError or OpenSSL::CipherError depending on which is present
2008-11-25 23:36:33 -08:00
Jeremy Kemper
4073a6d0a2
Remove XmlSimple dependencies
2008-11-25 19:49:49 -08:00
Jeremy Kemper
ab8fff2e3a
Unbundled XmlSimple
2008-11-25 18:55:09 -08:00
Joseph Holsten
fea8d9d06f
Extract XmlMini from XmlSimple. [ #1474 state:committed]
...
Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net >
2008-11-25 18:53:24 -08:00
Jeremy Kemper
8d2ca7dde1
Merge branch 'master' of git@github.com:rails/rails
2008-11-25 18:48:46 -08:00
Joshua Peek
c80fe1093d
Move debugger into middleware
2008-11-25 15:05:07 -06:00
Michael Koziarski
07abc5efe1
Add a MessageEncryptor, just like MessageVerifier but using symmetric key encryption.
...
The use of encryption prevents people from seeing any potentially secret values you've used. It also supports and encrypt_and_sign model to prevent people from tampering with the bits and creating random junk that gets fed to
A motivated coder could use this to add an :encrypt=>true option to the cookie store.
2008-11-25 20:51:30 +01:00
Joshua Peek
e126e1aac0
don't try to require vendored rack in script/server
2008-11-25 13:26:38 -06:00
Joshua Peek
3dd3ffde06
Depend on rack 0.4.0 instead of vendoring it
2008-11-25 13:20:12 -06:00
Joshua Peek
d4754677a3
Deprecate assert_valid
2008-11-25 12:32:14 -06:00
Joshua Peek
759183c822
Ensure ActionView will be available to ActionMailer if ActionController is not loaded
2008-11-25 10:38:20 -06:00
Craig Davey
f8558798d4
Ensure all HTML:: constants are available to autoload [ #1462 state:resolved]
...
Signed-off-by: Joshua Peek <josh@joshpeek.com >
2008-11-25 10:05:59 -06:00
Jeremy Kemper
d9c95c82e5
Explicitly require Active Support for tests
2008-11-24 22:45:44 -08:00
Jeremy Kemper
b6fd6ccc8f
AS::Dependencies also has core extensions; don't autoload it.
2008-11-24 22:42:11 -08:00
Jeremy Kemper
6482db8669
Explicitly require Action View also
2008-11-24 22:41:24 -08:00
Jeremy Kemper
ce50ca1baf
Explicitly require AS::Deprecation for the SecretKeyGenerator. Bring in ActiveSupport::TestCase for its tests.
2008-11-24 22:39:11 -08:00
Jeremy Kemper
cb49681710
Skip fcgi dispatcher tests if fcgi lib isn't available
2008-11-24 21:47:26 -08:00
Jeremy Kemper
d40bc307f9
Explicitly require action_view to bring in its i18n load path
2008-11-24 21:47:09 -08:00
Jeremy Kemper
36dcfcf126
Really remove components.
2008-11-24 18:48:00 -08:00
Jeremy Kemper
a5870d43e3
Rename Rails::Info.components to frameworks
2008-11-24 18:47:42 -08:00
Jeremy Kemper
104f3a5776
Add config.preload_frameworks to load all frameworks at startup. Default to false so Rails autoloads itself as it's used.
2008-11-24 18:43:04 -08:00
Jeremy Kemper
d01f75b1f0
Initializer#env relies on StringInquirer autoload. Style fixes.
2008-11-24 18:10:23 -08:00
Jeremy Kemper
536c239966
JSON can't be autoloaded since it includes core extensions
2008-11-24 13:08:25 -08:00
Jeremy Kemper
565fad350e
Ruby 1.9 compat: explicitly require delegate for cookie's DelegateClass
2008-11-24 12:05:17 -08:00
Jeremy Kemper
0f07b537ce
Require builder before fast_xs so we don't tickle its over-eager String#to_xs collision check
2008-11-24 11:39:51 -08:00
Jeremy Kemper
720ffdc42f
Explicitly require Builder in test that uses it
2008-11-24 11:05:54 -08:00
Jeremy Kemper
e06c5bef7f
Revert "Hack builder to look for fast_xs instead of insisting on its own String#to_xs"
...
This reverts commit 5d3712a81e .
2008-11-24 11:05:07 -08:00
Pratik Naik
1cbdd53bd3
Add a rake task to generate dispatchers : rake rails:generate_dispatchers
2008-11-24 19:50:09 +01:00
Pratik Naik
b7568e77d7
Fix typo in 5b5730cc6e
2008-11-24 19:35:09 +01:00
Yaroslav Markin
5b5730cc6e
Don't generate public/dispatch.cgi/fcgi/rb files by default.
...
Signed-off-by: Pratik Naik <pratiknaik@gmail.com >
2008-11-24 19:31:58 +01:00
Joshua Peek
835be0cbed
missed ActiveRecord::Migrator
2008-11-24 12:31:16 -06:00
Geoff Garside
61becfe2b9
Test default singleton resource route to ensure it uses GET. This is important if using map.root :resource instead of map.root :resources for some reason.
...
Signed-off-by: Michael Koziarski <michael@koziarski.com >
2008-11-24 19:19:56 +01:00
Geoff Garside
eac16d0ee1
Reorder the way in which map.resource routes are added to the set. This prevents the singular named route from hitting :create instead of :show.
...
Signed-off-by: Michael Koziarski <michael@koziarski.com >
2008-11-24 19:19:55 +01:00
Joshua Peek
8aeed003f5
prototype and scripty helpers require json
2008-11-24 12:17:07 -06:00
Joshua Peek
a76351093c
helpers require dependencies
2008-11-24 12:17:07 -06:00
Joshua Peek
d6b923adbd
get activerecord tests passing with lazy loading
2008-11-24 12:17:07 -06:00
Joshua Peek
21901e9345
fixtures depends on dependencies
2008-11-24 12:17:07 -06:00
Eloy Duran
823b623fe2
Allow optional arguments and/or block for Object#try like Object#send does. [ #1425 state:resolved]
...
Original suggestion by Pat Nakajima.
Signed-off-by: Pratik Naik <pratiknaik@gmail.com >
2008-11-24 18:53:48 +01:00
Joshua Peek
fffb1da3f2
require json lib when serialization is loaded
2008-11-24 11:52:29 -06:00
Joshua Peek
703fecb4fc
Add LAZY env flag for testing autoload/lazy load feature
2008-11-24 11:37:57 -06:00
Joshua Peek
368117c041
Autoload more ActiveSupport libs
2008-11-24 11:35:21 -06:00
Joshua Peek
7254d23764
Autoload ActiveRecord files
2008-11-24 11:14:24 -06:00
Joshua Peek
426a86ab1e
prefer autoloaded html scanner
2008-11-24 10:20:41 -06:00
Joshua Peek
f0f07c6427
prefer autoloading Mime::Type
2008-11-24 10:05:15 -06:00
Joshua Peek
5ffd1e0c02
Ensure integration test is load in script/console [ #1452 state:resolved]
2008-11-24 09:58:52 -06:00
David Heinemeier Hansson
42b4407e35
Strip out the ./ part of the test path so the backtrace align perfectly
2008-11-24 15:43:47 +01:00
Manfred Stienstra
1f48c09094
Accept a prefix argument to filter_backtrace_with_cleaning [ #1456 state:committed]
...
Add a prefix argument to filter_backtrace_with_cleaning so it has
the same arity as test/unit's filter_backtrace.
Signed-off-by: David Heinemeier Hansson <david@loudthinking.com >
2008-11-24 11:35:55 +01:00
David Heinemeier Hansson
f3f67ce621
Merge branch 'master' of git@github.com:rails/rails
2008-11-24 11:11:08 +01:00
David Heinemeier Hansson
eea5dc3a34
Removed the old .htaccess as it is no longer used
2008-11-24 11:09:06 +01:00
David Heinemeier Hansson
8b14686892
Updated docs to stop talking exclusively about lighttpd and clarify a few other things
2008-11-24 11:05:49 +01:00
Jeremy Kemper
2dd0ec48a5
Autoload HTML::Document and sanitizers
2008-11-23 19:12:00 -08:00
Jeremy Kemper
fb4bb93d43
Drop unneeded drb require
2008-11-23 18:29:38 -08:00
Jeremy Kemper
95072a6846
Fix dangling tzinfo dependency
2008-11-23 16:12:41 -08:00
Jeremy Kemper
6c7463deab
Autoload ActiveSupport::Duration, Gzip, OptionMerger, OrderedHash, OrderedOptions, StringInquirer, TimeWithZone, and TimeZone also
2008-11-23 16:11:32 -08:00
Jeremy Kemper
e44076f2c3
Autoload cache stores
2008-11-23 16:10:41 -08:00
Jeremy Kemper
49752e6ca5
Duration requires BasicObject in case it's autoloaded early
2008-11-23 16:10:20 -08:00
Jeremy Kemper
1250faa858
Lazy-require tzinfo for TimeZone
2008-11-23 16:08:00 -08:00
Jeremy Kemper
0eca8111f2
Autoload ActiveSupport::SecureRandom and ::MessageVerifier
2008-11-23 15:39:28 -08:00
Jeremy Kemper
308876fca2
Lazy-require tempfile for File#atomic_write
2008-11-23 15:31:57 -08:00
Jeremy Kemper
283418a785
Lazy-require DRb for ActiveSupport::Cache::DRbStore
2008-11-23 15:30:21 -08:00
Jeremy Kemper
51d155e697
Lazy-require OpenSSL
2008-11-23 15:29:03 -08:00
Jeremy Kemper
c26cb08998
Lazy-require OpenSSL. Skip entirely if SecureRandom is available.
2008-11-23 15:27:09 -08:00
Jeremy Kemper
9f5ab945b7
Lazy-require XmlSimple. Move CGI require to object conversions where it's actually used.
2008-11-23 15:26:32 -08:00
Jeremy Kemper
e931012287
Require Mocha >= 0.9.3 which includes a MiniTest adapter
2008-11-23 15:05:59 -08:00
Jeremy Kemper
5d3712a81e
Hack builder to look for fast_xs instead of insisting on its own String#to_xs
2008-11-23 15:05:57 -08:00
Jeremy Kemper
6de241be81
Lazy-require builder lib
2008-11-23 15:05:57 -08:00
Joshua Peek
31ce92f7b5
Use autoload instead of explicit requires for ActionController
2008-11-23 16:35:47 -06:00
Jeremy Kemper
6de1060eb5
Changelog for #1448 . Mention updating old translations with storage_units key.
2008-11-23 13:22:46 -08:00
Jeremy Kemper
6d91e7a7d6
Remove explicit tmail requires in favor of autoload
2008-11-23 13:16:39 -08:00
Joshua Peek
d75a234501
simplify console with helpers
2008-11-23 15:15:20 -06:00
Yaroslav Markin
d36158794b
Add i18n for number_to_human_size() helper storage units. Translation key is number.human.storage_units.
...
[#1448 state:committed]
Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net >
2008-11-23 13:11:59 -08:00
Jeremy Kemper
9d4ae40bb4
Move deprecation assertions so TestCase (and Mocha) needn't load on startup
2008-11-23 13:11:07 -08:00
Jeremy Kemper
2db8571edf
Don't hide deeper LoadErrors
2008-11-23 13:10:27 -08:00
Jeremy Kemper
e9aa975cc9
Eliminate thread-local circular reference stack by passing it as an argument instead
2008-11-23 12:36:03 -08:00
Jeremy Kemper
4454ff1bcb
Don't include .rb suffix in core_ext requires
2008-11-23 12:35:20 -08:00
Joshua Peek
bc4d05b244
A back support for legacy TemplateHandler#render API
2008-11-23 13:57:01 -06:00
Joshua Peek
2c01f2b4e9
use autoload instead of explicit requires for ActionView
2008-11-23 13:42:07 -06:00
Joshua Peek
e201fc750b
use autoload instead of explicit requires for ActionMailer
2008-11-23 12:27:25 -06:00
Michael Koziarski
04d2d043ca
Move the cookie store to use the MessageVerifier class.
...
This removes support for ancient cookie-store generated cookies which were double escaped.
2008-11-23 16:42:15 +01:00
Michael Koziarski
f9b1aa7f4c
Don't need _message as it's in the class name already
2008-11-23 16:33:56 +01:00
Michael Koziarski
d460c9a255
Add ActiveSupport::MessageVerifier to aid users who need to store tamper-proof messages in cookies etc.
...
This is particularly useful for things like remember-me tokens in web applications and auto-unsubscribe links in emails.
2008-11-23 15:33:59 +01:00
Michael Koziarski
c4a0143854
Update the generated controller to not include the deprecated :secret option to protect_from_forgery
2008-11-23 14:28:34 +01:00
Michael Koziarski
9fdb15e60f
Change the forgery token implementation to just be a simple random string.
...
This deprecates the use of :secret and :digest which were only needed when we were hashing session ids.
2008-11-23 14:28:34 +01:00
David Heinemeier Hansson
ed7549da28
Merge branch 'master' of git@github.com:rails/rails
2008-11-23 14:09:45 +01:00
David Heinemeier Hansson
db6b3a1f2c
Docfix [ #1444 state:committed]
2008-11-23 13:43:59 +01:00
Sam Pohlenz
5ea9f2cac6
Allow helpers directory to be overridden via ActionController::Base.helpers_dir (Sam Pohlenz) [ #1424 state:committed]
...
Signed-off-by: David Heinemeier Hansson <david@loudthinking.com >
2008-11-23 13:42:53 +01:00
Sam Pohlenz
bdf995bc5d
Allow helpers directory to be overridden via ActionController::Base.helpers_dir (Sam Pohlenz) [ #1424 state:committed]
...
Signed-off-by: David Heinemeier Hansson <david@loudthinking.com >
2008-11-23 13:41:52 +01:00
David Heinemeier Hansson
9e08a3bb1d
Added rake rails:update:application_controller to renamed application.rb to application_controller.rb -- included in rake rails:update so upgrading to 2.3 will automatically trigger it [ #1439 state:committed] (kastner)
2008-11-23 13:39:30 +01:00
Jeremy Kemper
4d2ccbb364
Use a relative require for bundled rack lib
2008-11-22 22:40:32 -08:00
Tom Lea
6b06c9870a
Changed the fallback String#each_char to use valid 1.9 syntax.
...
Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net >
2008-11-22 22:01:01 -08:00
Jeremy Kemper
e7208d382a
Get ActiveSupport::TestCase working with classic Test::Unit and MiniTest. Fix broken Mocha + MiniTest. Assume ruby-core applies patch #771 fixing libraries which extend Test::Unit.
2008-11-22 19:22:45 -08:00
Jeremy Kemper
c79fb32e93
Ruby 1.9 compat: don't shadow local var with block arg
2008-11-22 19:19:13 -08:00
Jeremy Kemper
dc07c0e02b
Fix indentation mismatches
2008-11-22 19:19:13 -08:00
Jeremy Kemper
0e2d18e415
Extract state query method definition and quiet method redefinition warning.
2008-11-22 19:19:13 -08:00
Jeremy Kemper
0492759db3
MiniTest compat: don't shadow @name
2008-11-22 19:19:13 -08:00
Jeremy Kemper
51383c57a2
MiniTest compat: don't check for test/unit's assertion in particular
2008-11-22 19:19:12 -08:00
Jeremy Kemper
a75354fae1
Ruby 1.9 compat: don't use defined? on complex expressions
2008-11-22 19:19:12 -08:00
Jeremy Kemper
f927a60d0f
Require mocha >= 0.9.0 for AS tests
2008-11-22 19:19:12 -08:00
Joshua Peek
708f4c3ae6
Switch script/server to use rack processor
2008-11-22 14:48:32 -06:00
Joshua Peek
cc67272cba
Vendor rack 0.4.0
2008-11-22 14:33:00 -06:00
Joshua Peek
4b36f76e7a
missed lighttpd config
2008-11-22 14:13:23 -06:00
Joshua Peek
40c6a8b970
Drop lighttpd support from script/server
2008-11-22 14:10:50 -06:00
Joshua Peek
0ecf2f6bdb
Kill dead "new_mongrel" handler
2008-11-22 14:00:58 -06:00
Cyril Mougel
2144c0f8ff
Add flush by ensure in script/runner because no flush in production mode [ #803 state:resolved]
...
Signed-off-by: Joshua Peek <josh@joshpeek.com >
2008-11-22 13:32:36 -06:00
Joshua Peek
20d6fdd256
write_fragment returns content if caching is disabled [ #846 state:resolved]
2008-11-22 13:19:11 -06:00
Lance Ivy
cd1a9ed991
Add TestResponse#client_error? to check for 4xx status codes [ #851 state:resolved]
...
Signed-off-by: Joshua Peek <josh@joshpeek.com >
2008-11-22 13:10:12 -06:00
David Heinemeier Hansson
f42c77f927
Added ActiveSupport::BacktraceCleaner and Rails::BacktraceCleaner for cutting down on backtrace noise (inspired by the Thoughtbot Quiet Backtrace plugin) [DHH]
2008-11-22 18:06:08 +01:00
David Heinemeier Hansson
a026b4c983
Let ApplicationController stay unloaded for as long as possible
2008-11-22 13:24:37 +01:00
David Heinemeier Hansson
e50530ca3a
Reduced the number of literal aliases to the range that has actually seen personal use. With the massive savings in overhead, I was able to fit Array#forty_two
2008-11-21 10:00:22 +01:00
Colin Curtin
1d4554d766
ActionMailer should respect content type when choosing layouts
...
Signed-off-by: Pratik Naik <pratiknaik@gmail.com >
2008-11-21 04:09:14 +05:30
Alexey Mahotkin
84583657f4
Fixed RFC-2045 quoted-printable bug [ #1421 state:committed]
...
http://www.faqs.org/rfcs/rfc2045.html says:
may be
represented by an "=" followed by a two digit
hexadecimal representation of the octet's value. The
digits of the hexadecimal alphabet, for this purpose,
are "0123456789ABCDEF". Uppercase letters must be
used; lowercase letters are not allowed.
ActionMailer, however, used "=%02x" specification.
Signed-off-by: David Heinemeier Hansson <david@loudthinking.com >
2008-11-20 23:10:15 +01:00
Jeremy Kemper
ebdbd854a9
Fix straggling references to Test::Unit::TestCase
2008-11-20 13:47:36 -08:00
Jeremy Kemper
b7a5ffd083
Update changelog to reflect move from Test::Unit::TestCase to ActiveSupport::TestCase
2008-11-20 13:47:36 -08:00
Jeremy Kemper
53104c34b1
Require mocha >= 0.9.0 for Active Support tests. Don't manipulate the load path.
2008-11-20 13:47:36 -08:00
Jeremy Kemper
d8a555e137
Mocha 0.9.0 compatibility for test setup/teardown callbacks
2008-11-20 13:47:35 -08:00
Daniel Schierbeck
a5156d9c2c
Ensure only delegations to methods can have an automatic prefix. [ #1235 state:resolved]
...
Signed-off-by: Pratik Naik <pratiknaik@gmail.com >
2008-11-21 01:15:49 +05:30
David Heinemeier Hansson
206c5643aa
Merge branch 'master' of git@github.com:rails/rails
2008-11-20 08:52:48 +01:00
Matt Jones
fb1eebac94
alternative resolution to vendor load problem
...
Signed-off-by: David Heinemeier Hansson <david@loudthinking.com >
2008-11-20 08:52:17 +01:00
Jeremy Kemper
20a346170c
Mocha >= 0.9.0 must be available for Action Pack tests
2008-11-19 19:14:52 -08:00
Aaron Batalion
e54c33bfc8
need to make sure the asset type is cached with it in Cache.. name is sufficient, not self
...
Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net >
2008-11-19 15:56:38 -08:00
Aaron Batalion
d7f4921a9a
Fixed asset host to not cache objects [ #1419 state:resolved]
...
Signed-off-by: Joshua Peek <josh@joshpeek.com >
2008-11-19 17:29:09 -06:00
Pratik Naik
dbbaccbcda
Revert "Simplify benchmarking and rescue". Need a different approach.
...
This reverts commit 3be9134d1c .
2008-11-20 04:50:34 +05:30
Pratik Naik
3be9134d1c
Simplify benchmarking and rescue
2008-11-20 04:17:48 +05:30
Jeremy Kemper
549388c244
Reflect default locale change from en-US to en
2008-11-19 12:22:06 -08:00
Jeremy Kemper
7ee9addb6e
Enumerable#none? conforms to Ruby 1.8.7 behavior
2008-11-19 11:51:57 -08:00
Jeremy Kemper
5b7d07f423
Require mocha for tests. Get rid of uses_mocha helper.
2008-11-19 11:08:34 -08:00
Jeremy Kemper
a1ce4008c8
Require mocha before the testcase overrides, otherwise its run method is clobbered
2008-11-19 11:08:19 -08:00
Jeremy Kemper
bedea33043
Eliminate method redefinition warning
2008-11-19 11:07:19 -08:00
Akira Matsuda
baa8ee5eb1
Require active_support/secure_random for Ruby 1.9.
...
[#1326 state:committed]
Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net >
2008-11-19 09:57:09 -08:00
Ken Collins
8e4624be9e
Remove SQL Server cases from tests for latest adapter work to pass rails expected behavior.
...
Signed-off-by: Michael Koziarski <michael@koziarski.com >
2008-11-19 18:00:56 +01:00
Pratik Naik
aeae79dc45
Remove deprecated ActionController::Base#assign_default_content_type_and_charset
2008-11-19 22:25:08 +05:30
Pratik Naik
9c3c42d8ea
Remove reset! as a connection#checkout callback
2008-11-19 21:18:07 +05:30
Pratik Naik
51730792ca
Added Object#try. ( Taken from http://ozmm.org/posts/try.html ) [Chris Wanstrath]
2008-11-19 19:36:42 +05:30
David Heinemeier Hansson
51a19ae2bf
Assume that the next version is going to be 2.3 for now
2008-11-19 14:12:38 +01:00
David Heinemeier Hansson
e442448fa3
Changed the default of ActionView#render to assume partials instead of files when not given an options hash [DHH]
2008-11-19 14:06:15 +01:00
David Heinemeier Hansson
130fe74d17
Changed the default of ActionView#render to assume partials instead of files when not given an options hash [DHH]
2008-11-19 14:00:16 +01:00
Pratik Naik
27c03e69e9
Remove deprecated render_component. Please use the plugin from http://github.com/rails/render_component/tree/master
2008-11-19 17:48:57 +05:30
David Heinemeier Hansson
0c9f677e78
Another piece of markup removed from environment.rb
2008-11-19 12:37:04 +01:00
David Heinemeier Hansson
53eba2f218
The docs in environment.rb are not going to be rendered so it doesnt make sense to mark them up
2008-11-19 12:31:34 +01:00
David Heinemeier Hansson
70babd4ebb
Update doc to make more sense
2008-11-19 12:19:11 +01:00
Hiroshi Saito
291d199de1
Let polymorphic_path treat an array contains single name as without array [ #1386 state:committed]
...
Signed-off-by: David Heinemeier Hansson <david@loudthinking.com >
2008-11-19 12:07:12 +01:00
Damian Janowski
f451f0e5cf
Added Enumerable#none? to check that none of the elements match the block [ #1408 state:committed]
...
Signed-off-by: David Heinemeier Hansson <david@loudthinking.com >
2008-11-19 10:48:41 +01:00
Gabe da Silveira
917428bcce
Make optimized named routes respect all reserved options and tie it into UrlRewriter::RESERVED_OPTIONS so it's DRY
...
Signed-off-by: Michael Koziarski <michael@koziarski.com >
2008-11-18 22:47:33 +01:00
Luke Melia
60d6f25517
Fix rendering html partial via inline render when with :js format [ #1399 state:resolved]
...
Signed-off-by: Joshua Peek <josh@joshpeek.com >
2008-11-18 15:19:16 -06:00
Michael Koziarski
9c01d3cead
Spam more people, the list is next
2008-11-18 20:52:07 +01:00
Hongli Lai (Phusion)
337c361e26
Register 'checked' as an HTML boolean attribute.
...
This way, 'tag :foo, :type => "checkbox", :checked => false' would output
the expected
<input type="checkbox" />
instead of the old
<input type="checkbox" checked="false" />
The latter would result in a checkbox that's initially checked.
Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net >
2008-11-18 11:50:31 -08:00
Michael Koziarski
19e9a1f47d
Remove duplicate distribution of prototype and scriptaculous.
...
This was previously needed by define_javascript_functions which has been removed for a while.
2008-11-18 20:11:55 +01:00
Michael Koziarski
b579184819
Remove mention of long-dead define_javascript_functions
2008-11-18 20:11:55 +01:00
Thomas Fuchs
252ca3e3e7
Update Prototype to 1.6.0.3 and update script.aculo.us to 1.8.2
2008-11-18 19:24:22 +01:00
gbuesing
1955c164b3
TimeZone offset tests: use current_period, to ensure TimeZone#utc_offset is up-to-date
2008-11-18 09:38:12 -06:00
gbuesing
9ad165cb9d
Update bundled TZInfo to 0.3.12
2008-11-18 09:01:57 -06:00
Matt Jones
45ba4ec626
add vendor/ back to load paths; catch errors in constant loading
...
Signed-off-by: David Heinemeier Hansson <david@loudthinking.com >
2008-11-18 14:32:46 +01:00
Sven Fuchs
12118963ac
use :en as a default locale (in favor of :en-US)
...
Signed-off-by: David Heinemeier Hansson <david@loudthinking.com >
2008-11-18 14:23:53 +01:00
David Heinemeier Hansson
d9b92ee11b
Added config.i18n settings gatherer to config/environment, auto-loading of all locales in config/locales/*.rb,yml, and config/locales/en.yml as a sample locale [DHH]
2008-11-18 14:23:13 +01:00
Luke Melia
75fb8dfb99
Prevent assert_template failures when a render :inline is called before rendering a file-based template [ #1383 state:resolved]
...
Signed-off-by: Joshua Peek <josh@joshpeek.com >
2008-11-17 22:09:22 -06:00
Eugene Bolshakov
3c9beb3dab
Add helper test generators [ #1199 state:resolved]
...
Signed-off-by: Joshua Peek <josh@joshpeek.com >
2008-11-17 21:56:39 -06:00
Pratik Naik
d22fe41cf8
Fix a typo in test helper
2008-11-18 08:40:38 +05:30
Pratik Naik
3319fa6965
Dont require 'application' when running tests
2008-11-18 08:38:01 +05:30
Pratik Naik
8f71d6bcf6
Fix script/console
2008-11-18 08:28:26 +05:30
Jeremy Kemper
5c84151186
Merge branch 'master' of git@github.com:rails/rails
2008-11-17 15:28:17 -08:00
Jeremy Kemper
5a4789e86a
Explicitly require test/unit so tests autorun
2008-11-17 15:18:01 -08:00
Tom Stuart
32cb2345a5
Fix default_scope to work in combination with named scopes
...
Signed-off-by: David Heinemeier Hansson <david@loudthinking.com >
2008-11-17 22:00:14 +01:00
Hongli Lai (Phusion)
3a33ee28e9
Fix compatibility with Ruby 1.8 that also has the Miniunit gem installed.
...
Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net >
2008-11-17 12:38:47 -08:00
Jeremy Kemper
2ace3d9154
Explicitly require AS::Duration
2008-11-17 11:38:24 -08:00
Carlos Paramio
8412200f90
Change usage of defined? to check the rubygems constant existance by a rescue block on boot.rb for Ruby 1.9 compatibility
...
Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net >
2008-11-17 10:53:18 -08:00
Jeremy Kemper
e3fcf9b668
Use ActiveSupport::TestCase in generated test/test_helper.rb
2008-11-17 10:39:46 -08:00
Jeremy Kemper
435b088f5a
Merge branch 'master' of git@github.com:rails/rails
2008-11-17 10:36:02 -08:00
David Heinemeier Hansson
fcce1f17ea
BACKWARDS INCOMPATIBLE: Renamed application.rb to application_controller.rb and removed all the special casing that was in place to support the former. You must do this rename in your own application when you upgrade to this version [DHH]
2008-11-17 19:27:35 +01:00
Jeremy Kemper
6ff506ffbc
Merge branch 'master' of git@github.com:rails/rails
2008-11-17 10:17:42 -08:00
David Heinemeier Hansson
4b33fae1f5
Fixed RedCloth and BlueCloth shouldn't preload. Instead just assume that they're available if you want to use textilize and markdown and let autoload require them [DHH]
2008-11-17 18:31:36 +01:00
David Heinemeier Hansson
54c1856425
The inflector is meant to work on words not phrases -- dont confuse people with a phrase example
2008-11-16 21:29:48 +01:00
Joshua Peek
e6c51051e4
Ensure shared default_scoping stack is duped before assigning to thread local
2008-11-16 13:52:21 -06:00
Michael Koziarski
8c197fb4ab
Add text/plain to the browser_generated_types array as webkit and gecko can submit them.
...
For more information see:
http://pseudo-flaw.net/content/web-browsers/form-data-encoding-roundup/
2008-11-16 20:24:46 +01:00
Pratik Naik
2530d0eea8
Added default_scope to Base [ #1381 state:committed] (Paweł Kondzior)
2008-11-16 23:36:41 +05:30
Pratik Naik
d9f460a39b
Ensure @@already_loaded_fixtures is initialized before use
2008-11-16 22:21:05 +05:30
David Heinemeier Hansson
ca23287b44
Revert "Added default_scope to Base [ #1381 state:committed] (Paweł Kondzior)" -- won't gel with threads.
...
This reverts commit ff594b2bc9 .
2008-11-16 16:35:52 +01:00
David Heinemeier Hansson
ff594b2bc9
Added default_scope to Base [ #1381 state:committed] (Paweł Kondzior)
2008-11-16 16:01:18 +01:00
Jeremy Kemper
29a31912fc
Lazy-require state machine internals when the module is included
2008-11-15 21:05:03 -08:00
Jeremy Kemper
d7bad6e2eb
Use the Ruby load path for test_helper requires. Fix AM::TestCase.
2008-11-15 20:25:14 -08:00
Jeremy Kemper
9e9dde617f
Require callbacks so AS::TestCase may be required in isolation
2008-11-15 19:07:57 -08:00
Jeremy Kemper
c5448c75ab
Switch to AS::TestCase for assert_deprecated
2008-11-15 13:28:46 -08:00
Jeremy Kemper
5fe543b629
Add create_fixtures method for tests
2008-11-15 12:31:54 -08:00
Jeremy Kemper
160b8a8344
Set up fixtures for AR tests
2008-11-15 12:30:02 -08:00
Jeremy Kemper
0cd9b149e2
Appropriate test case subclasses to get assert_tag and assert_deprecated
2008-11-15 12:26:37 -08:00
Jeremy Kemper
eeea1a26ec
Merge branch 'master' into testing
2008-11-15 12:21:04 -08:00
Mislav Marohnić
4f984c9d0e
auto_link helper: add intelligent ending closing bracket handling. add new tests and reorder new ones for readability
...
Signed-off-by: Michael Koziarski <michael@koziarski.com >
[#1353 state:committed]
2008-11-15 18:30:17 +01:00
Mislav Marohnić
c6c5cd5541
refactor autolink helper. change tests to expect HTML-escaped URLs
...
Signed-off-by: Michael Koziarski <michael@koziarski.com >
2008-11-15 18:30:01 +01:00
Will Bryant
789a3f5b03
Moved the * strings out of construct_finder_sql to a new default_select method so it can be overridden by plugins cleanly
...
Signed-off-by: Michael Koziarski <michael@koziarski.com >
[#1371 state:resolved]
2008-11-15 18:26:41 +01:00
Matt Jones
d3fd997109
fix assignment to has_one :through associations.
...
Signed-off-by: Michael Koziarski <michael@koziarski.com >
2008-11-15 18:20:39 +01:00
David Heinemeier Hansson
31be959de7
Wrong reference
2008-11-15 16:49:20 +01:00
David Heinemeier Hansson
9eaa0a3449
Added lambda merging to OptionMerger (especially useful with named_scope and with_options) [ #740 state:committed] (Paweł Kondzior)
2008-11-15 16:48:14 +01:00
David Heinemeier Hansson
8d8195dc24
Merge branch 'master' of git@github.com:rails/rails
2008-11-15 16:44:58 +01:00
David Heinemeier Hansson
e6b33a8337
Added lambda merging to OptionMerger (especially useful with named_scope and with_options) [ #740 state:commited] (Paweł Kondzior)
2008-11-15 16:44:47 +01:00
David Heinemeier Hansson
f46780a0b4
Fixed that no body charset would be set when there are attachments present [ #740 state:commited] (Paweł Kondzior)
2008-11-15 11:05:44 +01:00
Michael Koziarski
44c3b865ac
Missing changelogs for relative_url_root changes
2008-11-14 16:11:07 +01:00
Michael Koziarski
065cc202ce
Missing changelog for memcache-client changes
2008-11-14 16:11:07 +01:00
Michael Koziarski
e4a345c1dc
Missing changelog for CSRF changes
2008-11-14 16:11:07 +01:00
Michael Koziarski
16ae82db1e
Missing changelog for :only/:except on map.resources
2008-11-14 16:11:07 +01:00
Pratik Naik
ad679a43ec
Update release notes from docrails.
2008-11-14 20:32:33 +05:30
David Heinemeier Hansson
3be853b59d
A few more dependency updates
2008-11-14 14:08:26 +01:00
David Heinemeier Hansson
4d0e6752bf
Link to 2.2.1 gems
2008-11-14 13:52:32 +01:00
Pratik Naik
c70b993a9e
Merge docrails.
2008-11-14 17:47:21 +05:30
Pratik Naik
549b18c928
Rails now requires rubygems 1.3.1 of higher.
2008-11-14 17:09:40 +05:30
David Heinemeier Hansson
c562dfc2a7
Merge branch 'master' of git@github.com:rails/rails
2008-11-14 12:27:08 +01:00
David Heinemeier Hansson
61e43700b8
Prepare for RC2
2008-11-14 12:26:50 +01:00
Tom Stuart
2ecec6052f
Make inheritance of map.resources :only/:except options behave more predictably
...
Signed-off-by: Michael Koziarski <michael@koziarski.com >
2008-11-14 12:26:43 +01:00
hiroshi
94d6716324
Make polymorphic_url compact given array [ #1317 state:committed]
...
Signed-off-by: David Heinemeier Hansson <david@loudthinking.com >
2008-11-14 12:07:52 +01:00
David Heinemeier Hansson
ff4ccb8334
Revert "Move fixtures settings from AR::TestCase to railties test_help" -- it broke all the tests!
...
This reverts commit 9a88ab64bb .
2008-11-14 12:01:26 +01:00
Amos King
db7daa04b8
Fix typo in pool_conections_test [ #1350 state:committed]
...
Signed-off-by: David Heinemeier Hansson <david@loudthinking.com >
2008-11-14 11:54:05 +01:00
Chris Wanstrath
334178722b
Properly check silence_spec_warnings class variable [ #1372 state:committed]
...
Signed-off-by: David Heinemeier Hansson <david@loudthinking.com >
2008-11-14 11:49:30 +01:00
Jeremy Kemper
9a88ab64bb
Move fixtures settings from AR::TestCase to railties test_help
2008-11-13 19:09:23 -08:00
Jeremy Kemper
1304b66492
Remove superfluous require
2008-11-13 19:03:24 -08:00
Jeremy Kemper
d3c36b4f0a
Merge branch 'master' into testing
2008-11-13 19:02:59 -08:00
Jeremy Kemper
98a711f122
Move fixtures settings from AR::TestCase to railties test_help
2008-11-13 19:02:49 -08:00
Hongli Lai (Phusion)
4e9abdd7f1
Tag helper should output an attribute with the value 'false' instead of omitting the attribute, if the associated option is false but not nil.
2008-11-13 21:55:58 +01:00
Tom Stuart
4c09210244
Fix map.resources to always generate named routes if they're needed
...
Signed-off-by: Michael Koziarski <michael@koziarski.com >
2008-11-13 17:49:09 +01:00
Ken Collins
57d795bad4
Make sure any Fixnum returned by a DB sum is type cast to a Float before standard converstion to a BigDecimal [ #8994 state:resolved]
...
Signed-off-by: Joshua Peek <josh@joshpeek.com >
2008-11-13 10:45:57 -06:00
gbuesing
f857da4faf
Merge branch 'master' of git@github.com:rails/rails
2008-11-13 09:04:24 -06:00
gbuesing
020a411304
TimeZone: fix base offset for Sri Jayawardenepura. Anchor tests for zone offsets to more current date
2008-11-13 09:04:06 -06:00
Michael Koziarski
f1ad8b48aa
Instead of overriding html_types, base the verification on browser_generated_types.
...
Also Deprecate the old unverifiable types.
[#1145 state:committed]
2008-11-13 11:23:34 +01:00
rick
00c46b5eeb
fix two MimeType failing test cases
...
Signed-off-by: Michael Koziarski <michael@koziarski.com >
2008-11-13 11:23:34 +01:00
Jeff Cohen
fbbcd6f29a
Changed request forgery protection to only worry about HTML-formatted content requests.
...
Signed-off-by: Michael Koziarski <michael@koziarski.com >
2008-11-13 11:23:21 +01:00
Phil Ross
02df503d3b
TimeZone: Caracas GMT offset changed to -4:30 [ #1361 state:resolved]
2008-11-12 20:30:00 -06:00
Jeremy Kemper
b17eb65d00
Move fixtures settings from AR::TestCase to railties test_help
2008-11-12 11:33:09 -08:00
Jeremy Kemper
a0e7b99443
Remove deprecated Gem.manage_gems
2008-11-12 11:32:36 -08:00
Jeremy Kemper
02b716a322
Prefer a feature check to a version check
2008-11-12 11:32:15 -08:00
Tom Stuart
44a3009ff0
Add :only/:except options to map.resources
...
This allows people with huge numbers of resource routes to cut down on the memory consumption caused by the generated code.
Signed-off-by: Michael Koziarski <michael@koziarski.com >
[#1215 state:committed]
2008-11-12 12:57:58 +01:00
Jeremy Kemper
5d2b5ba23e
Merge branch 'master' into testing
2008-11-11 10:22:09 -08:00
Joel Chippindale
c65075feb6
Fixed method_missing for ActionMailer so it no longer matches methods where deliver or create are not a suffix [ #1318 state:resolved]
...
Signed-off-by: Joshua Peek <josh@joshpeek.com >
2008-11-11 09:46:29 -06:00
Joel Chippindale
a62e9e90d8
Fix for ActionMailer::Base.method_missing so that it raises NoMethodError when no method is found [ #1330 state:resolved]
...
Signed-off-by: Joshua Peek <josh@joshpeek.com >
2008-11-11 09:46:29 -06:00
Frederick Cheung
78a18392e1
Remove redundant uniq
2008-11-11 11:22:13 +01:00
Jeremy Kemper
cbb38bbdba
Only track new constant definitions when we're reloading dependencies
2008-11-10 22:21:09 -08:00
Jeremy Kemper
278b6cd952
Eliminate excess Regexp creation due to capture counting
2008-11-10 22:21:09 -08:00
Jeremy Kemper
5db9f9b3ad
Pare down object creation during route building
2008-11-10 22:21:09 -08:00
Joshua Peek
335a315240
Add simple case when DB calculations returns 0 instead of 0.0 [ #1346 state:resolved]
2008-11-10 14:16:43 -06:00
Jeremy Kemper
17ac2a2482
Ruby 1.9 compat: check for minitest's assertion also
2008-11-08 22:49:28 -05:00
Jeremy Kemper
1df0a07f06
lazy-initialize already loaded fixtures map
2008-11-08 22:49:00 -05:00
Jeremy Kemper
d87d3f76d5
Ruby 1.9 compat: rescue Exception since minitest's assertion doesn't subclass StandardError
2008-11-08 22:46:13 -05:00
Jeremy Kemper
8bfd5edbcf
Wrap straggling mocha user with uses_mocha block
2008-11-08 22:43:56 -05:00
Jeremy Kemper
eda9f49d57
Ruby 1.9 compat: CGI switched back to Tempfile
2008-11-08 22:43:29 -05:00
Jeremy Kemper
8a1f913381
Workaround lack of Mocha on 1.9 (hasn't been updated for minitest yet)
2008-11-08 22:35:30 -05:00
Jeremy Kemper
ace9e533dc
Merge branch 'master' into testing
2008-11-08 18:58:29 -05:00
Jeremy Kemper
a6d6a1c9ac
Move sshpublisher require into the rake tasks that use it so ruby 1.9 and macruby don't need the rake gem installed
2008-11-08 18:58:08 -05:00
Pratik Naik
5cc27f2b03
Add some basic controller logging tests
2008-11-08 18:45:19 +05:30
Jeremy Kemper
dd77733f2f
Timeout the connection pool monitor on ruby 1.8 only
2008-11-08 00:27:18 -05:00
Jeremy Kemper
661980692b
Merge branch 'master' into testing
2008-11-07 21:54:29 -05:00
Jeremy Kemper
7c73518ef7
Merge branch 'master' of git@github.com:rails/rails
2008-11-07 21:54:18 -05:00
Jeremy Kemper
c0310bde48
Merge branch 'master' into testing
2008-11-07 21:51:08 -05:00
Jeremy Kemper
0be5bc3f59
Work around ruby 1.9 segfault
2008-11-07 21:50:39 -05:00
Ken Collins
a7f920f674
If average value from DB is 0, make sure to convert it to a 0.0 float before calling #to_d on it [ #1346 state:resolved]
...
Signed-off-by: Joshua Peek <josh@joshpeek.com >
2008-11-07 20:39:06 -06:00
Jeremy Kemper
425382d95f
Don't worry about attribute ordering
2008-11-07 21:21:10 -05:00
Jeremy Kemper
07fe3370f8
Check whether last arg is a Hash instead of duck-typing against []
2008-11-07 21:20:26 -05:00
Jeremy Kemper
aaa2abf73f
Use delete if the rhs is nil
2008-11-07 21:19:02 -05:00
Jeremy Kemper
0994d11f26
Merge branch 'master' into testing
2008-11-07 19:55:29 -05:00
Jeremy Kemper
1767c4b2da
Merge branch 'master' of git@github.com:rails/rails
2008-11-07 19:49:15 -05:00
Jeremy Kemper
c77e6ace66
Check whether last arg is a Hash instead of duck-typing against []
2008-11-07 17:46:03 -05:00
Jeremy Kemper
99648c9672
Don't worry about attribute ordering
2008-11-07 17:45:10 -05:00
Jeremy Kemper
110c044e20
Use delete if the rhs is nil
2008-11-07 17:44:31 -05:00
Pratik Naik
d20955f889
Don't leave open dangling connections in development mode. [ #1335 state:resolved]
2008-11-08 04:04:32 +05:30
Nick Sieger
529c271699
Simplify dispatcher callbacks to eliminate unnecessary stale thread purging. [Nick Sieger, Pratik Naik]
...
Signed-off-by: Pratik Naik <pratiknaik@gmail.com >
2008-11-08 03:49:54 +05:30
Jeremy Kemper
582aa2ead5
Set up fixtures in app's test_help
2008-11-07 16:23:22 -05:00
Jeremy Kemper
1d803e5189
Update AR tests
2008-11-07 16:22:56 -05:00
Jeremy Kemper
15c0774920
undef abstract methods instead of raising NotImplementedError. Still need the definitions for rdoc though.
2008-11-07 16:22:28 -05:00
Jeremy Kemper
4af46c4ba1
Update AR integration tests for TestCase changes
2008-11-07 15:51:50 -05:00
Jeremy Kemper
c82e8e1f48
Move controller assertions from base TestCase to AC:: and AV::TestCase
2008-11-07 15:42:34 -05:00
Jeremy Kemper
ebf14baa0e
Silence parens warning
2008-11-07 15:41:27 -05:00
Jeremy Kemper
b0ee1bdf26
Remove fixtures from Test::Unit::TestCase. Mix in AR::TestFixtures instead.
2008-11-07 15:40:56 -05:00
Rich Manalang
d3ec1d3c22
auto_link view helper was failing on URLs with colons after a query param
...
Signed-off-by: Michael Koziarski <michael@koziarski.com >
[#1341 state:committed]
2008-11-07 19:33:18 +00:00
Jeremy Kemper
d355921709
Remove controller assertions from Test::Unit::TestCase. Use ActionController::TestCase.
2008-11-07 13:27:06 -05:00
Jeremy Kemper
00f72cf99d
Set AS::TestCase::Assertion to the underlying test exception for either miniunit or test/unit
2008-11-07 13:26:28 -05:00
Jeremy Kemper
ae9581e0f3
Extract test method declaration
2008-11-07 13:25:40 -05:00
Jeremy Kemper
728606df91
Just rescue exception rather than checking for both miniunit and test/unit
2008-11-07 13:00:13 -05:00
Jeremy Kemper
f12a2b4820
Subclass AS::TestCase to get custom assertions
2008-11-07 12:59:29 -05:00
Jeremy Kemper
70c2fcab09
Safer but hacky minitest autorun override
2008-11-07 12:58:42 -05:00
Jeremy Kemper
18099b0fd5
Rework testing extensions to reflect the recent miniunit upheaval
2008-11-07 12:45:48 -05:00
Tekin Suleyman
32a5cfcd7f
Added tests for HABTM associations with counter_sql
...
Signed-off-by: Michael Koziarski <michael@koziarski.com >
[#1102 state:committed]
2008-11-07 07:50:30 +00:00
Tekin Suleyman
26978e3ce8
Added :counter_sql as a valid key for habtm associations
...
Signed-off-by: Michael Koziarski <michael@koziarski.com >
2008-11-07 07:50:23 +00:00
Michael Koziarski
9d4337ea13
Revert commit which breaks all the tests.
...
This reverts commit 8adb79b9b5 .
Conflicts:
activerecord/CHANGELOG
2008-11-07 07:31:59 +00:00
Jeremy Kemper
7b28a55a2b
Remove direct TestCase mixins. Add miniunit compatibility.
2008-11-07 01:16:06 -05:00
Jeremy Kemper
983dc80787
Don't shadow local with black arg
2008-11-07 01:08:59 -05:00
Jeremy Kemper
66d4b55899
Fix indentation mismatch
2008-11-07 01:08:21 -05:00
Jeremy Kemper
b5291ed0f1
Mark utf-8 encoding
2008-11-07 01:01:04 -05:00
Joshua Peek
77697e0335
Fix memory leak issue in ActiveRecord scoped_methods
2008-11-06 17:10:16 -06:00
Luca Guidi
4ccbc5dffb
Increment the version of our modified memcache_client code to prevent users with the gem installed not seeing our changes.
...
The changes will be submitted upstream.
Signed-off-by: Michael Koziarski <michael@koziarski.com >
[#1239 state:committed]
2008-11-06 19:59:02 +00:00
Aliaksey Kandratsenka
099f10679e
Don't eval recognize_optimized use __FILE__ and __LINE__ in the optimised recognition code.
...
It produces meaningless line numbers. This also easily produces line numbers greater than recognition_optimization.rb have, which causes rcov to trash memory outside of it's coverage counting arrays.
[#1319 state:committed]
Signed-off-by: Michael Koziarski <michael@koziarski.com >
2008-11-06 19:52:44 +00:00
Michael Koziarski
af5b304a40
Fix stupid typo
2008-11-06 18:52:02 +00:00
Grant Hollingworth
732c724df6
Turn on STARTTLS if it is available in Net::SMTP (added in Ruby 1.8.7) and the SMTP server supports it [ #1336 state:committed]
...
Signed-off-by: David Heinemeier Hansson <david@loudthinking.com >
2008-11-06 13:07:16 +01:00
David Heinemeier Hansson
6406a87eed
Fixed the sanitize helper to avoid double escaping already properly escaped entities [ #683 state:committed]
2008-11-06 13:03:19 +01:00
David Heinemeier Hansson
a358d87e16
Fixed the sanitize helper to avoid double escaping already properly escaped entities [ #683 state:committed]
2008-11-06 13:02:32 +01:00
David Heinemeier Hansson
077773257b
Stop logging SHOW FIELDS and SET SQL_AUTO_IS_NULL=0 for the MysqlAdapter as they only clutter up the log and offer no value [DHH]
2008-11-06 12:59:17 +01:00
David Heinemeier Hansson
8adb79b9b5
Stop logging SHOW FIELDS and SET SQL_AUTO_IS_NULL=0 for the MysqlAdapter as they only clutter up the log and offer no value [DHH]
2008-11-06 10:00:15 +01:00
David Heinemeier Hansson
55707da1a1
Dont bother logging the parameters hash if there are no parameters
2008-11-06 09:59:11 +01:00
Pratik Naik
0832bc63f4
Make sure ActiveRecord::Base.connected? doesn't raise an exception for defined connections
2008-11-06 01:29:09 +05:30
Pratik Naik
396d599e24
Update guides from docrails
2008-11-06 01:10:30 +05:30
Wes Oldenbeuving
32089cbcc9
Ensure ActiveRecord::ConnectionPool.connected? handles undefined connections. [ #936 state:resolved]
...
Signed-off-by: Pratik Naik <pratiknaik@gmail.com >
2008-11-06 00:24:09 +05:30
Vladimir Dobriakov
5fad229e43
Fixed that FormTagHelper generates illegal html if name contains e.g. square brackets [ #1238 state:committed]
...
Signed-off-by: David Heinemeier Hansson <david@loudthinking.com >
2008-11-04 18:24:52 +01:00
Bernardo de Pádua
b2cd318c2e
Fix regression bug that made date_select and datetime_select raise a Null Pointer Exception when a nil date/datetime was passed and only month and year were displayed [ #1289 state:committed]
...
Signed-off-by: David Heinemeier Hansson <david@loudthinking.com >
2008-11-04 18:15:54 +01:00
David Heinemeier Hansson
a909eecbbd
Dont log the _method attribute either. Its already available in the header
2008-11-04 18:14:29 +01:00
David Heinemeier Hansson
b29f95ed9a
Dont log the _method attribute either. Its already available in the header
2008-11-04 18:12:32 +01:00
Hongli Lai (Phusion)
fb2325e358
Reimplement Jeremy's PostgreSQL automatic transaction state introspection code.
...
- Fixed compatibility with the old 'postgres' driver which doesn't support
transaction state introspection.
- Added unit tests for it.
2008-11-03 20:56:28 +01:00
Hongli Lai (Phusion)
e916aa7ea1
Rename ActiveRecord::Base#transaction's :force option to :nest. Improve documentation for nested transactions.
2008-11-03 20:56:21 +01:00
Hongli Lai (Phusion)
885c11b8f9
Make SQLite3 pass the unit tests for savepoints.
2008-11-03 20:56:14 +01:00
Hongli Lai (Phusion)
e981eaaf34
Fix a stale typo in the PostgreSQL adapter. Fix a stale mock expection in transaction_test.
2008-11-03 20:56:07 +01:00
Hongli Lai (Phusion)
e383835e73
Revert "PostgreSQL: introduce transaction_active? rather than tracking activity ourselves"
...
This commit conflicts with savepoint support.
This reverts commit 045713ee24 .
Conflicts:
activerecord/lib/active_record/connection_adapters/postgresql_adapter.rb
2008-11-03 20:56:00 +01:00
Hongli Lai (Phusion)
f48703e8c6
Fix the final MySQL unit test failure that's related to savepoint support.
2008-11-03 20:55:53 +01:00
Hongli Lai (Phusion)
47b594cc5a
Improve documentation for DatabaseStatements#transactions and AbstractAdapter#transactional_fixtures, especially with regard to support for nested transactions.
2008-11-03 20:55:47 +01:00
Jonathan Viney
3f4a8b6d0a
Fix assert_queries failures by ignoring savepoint sql.
2008-11-03 20:55:40 +01:00
Jonathan Viney
b1b204abbb
Fix what looks like a Mysql bug with transactions, savepoints, and create table.
2008-11-03 20:55:33 +01:00
Jonathan Viney
b3420f5a2e
Implement savepoints.
2008-11-03 20:55:26 +01:00
Pratik Naik
18bf7b421d
Remove unused debug_routes
2008-11-02 23:23:19 +05:30
Pratik Naik
934f98e4cf
Dont dup params twice when filter_parameters is present
2008-11-02 23:19:44 +05:30
Pratik Naik
aba1d77f38
Check first for git repository before using git branch
2008-11-02 19:36:56 +05:30
Pratik Naik
be1beb1a2d
Dont document internals
2008-11-02 18:36:14 +05:30
Pratik Naik
dc37fdc480
Merge docrails. Remove unnecessary files.
2008-11-02 18:13:54 +05:30
Michael Koziarski
8a53e258e5
Backwards compatibility fixes for relative_url_root
...
* Make the old deprecated relative_url_root still set the value as it's still used by mongrel
* Set the default from the ENV value when the file is required, not at runtime.
2008-11-02 13:12:48 +01:00
Pratik Naik
b047929c14
Merge with docrails
2008-11-02 04:02:40 +05:30
Tom Lea
5a02f0bccf
Cleaned up route optimisation guard condition generation code as it was getting a little messy.
...
Add additional condition to handle the case where default_url_options is only defined in the controller, not the view.
Signed-off-by: Michael Koziarski <michael@koziarski.com >
2008-11-01 19:06:25 +01:00
Matt Jones
01433af6a5
Make refresh_specs more resilient. Always add vendor/gems to gem search path. Use Gem.clear_paths to ensure we get a current searcher.
...
Signed-off-by: Michael Koziarski <michael@koziarski.com >
2008-11-01 17:35:56 +01:00
David Heinemeier Hansson
62ffc6e4db
Simplified the logging format for parameters (don't include controller, action, and format as duplicates) [DHH]
2008-11-01 15:46:30 +01:00
David Heinemeier Hansson
fbe387ea25
Merge branch 'master' of git@github.com:rails/rails
2008-11-01 15:04:28 +01:00
Luca Guidi
5229fc4cc0
Make sure habtm use class variable to list association valid keys
...
Signed-off-by: Michael Koziarski <michael@koziarski.com >
[#1310 state:committed]
2008-11-01 15:04:08 +01:00
Luca Guidi
3f6653f9fd
Make sure habtm use class variable to list association valid keys
...
Signed-off-by: Michael Koziarski <michael@koziarski.com >
[#1310 state:committed]
2008-11-01 12:25:29 +01:00
David Heinemeier Hansson
5110a8e05b
Remove the logging of the Session ID when the session store is CookieStore [DHH]
2008-11-01 12:16:15 +01:00
David Heinemeier Hansson
aea7e8c2f3
Accidently nixed a doc header
2008-11-01 12:05:55 +01:00
David Heinemeier Hansson
cbeac93310
Added render :js for people who want to render inline JavaScript replies without using RJS [DHH]
2008-11-01 12:03:49 +01:00
Jeffrey Hardy
408c722757
Really silence spec warnings when running GemDependency tests [ #1308 state:resolved]
...
Signed-off-by: David Heinemeier Hansson <david@loudthinking.com >
2008-10-31 18:45:36 +01:00
David Heinemeier Hansson
c50667e961
Merge branch 'master' of git@github.com:rails/rails
2008-10-31 18:41:45 +01:00
David Heinemeier Hansson
e466ae13e9
Fixed the option merging in Array#to_xml [ #1126 state:resolved]
2008-10-31 18:41:25 +01:00
Joshua Peek
fc215de52f
Revert "config.load_paths should be frozen [ #728 state:resolved]"
...
This reverts commit 2dcdcf1552 .
2008-10-30 16:28:23 -05:00
Joshua Peek
4df5e1ae8f
It is not necessary to store QueryCache in a thread local since the cache is local to the connection object which is managed by the connection pool
2008-10-30 16:27:13 -05:00
Joshua Peek
2dcdcf1552
config.load_paths should be frozen [ #728 state:resolved]
2008-10-30 15:52:12 -05:00
Joshua Peek
0c84b6f9ed
Use database name in query cache thread local key [ #1283 state:resolved]
2008-10-30 15:48:03 -05:00
Joshua Peek
2092687bcb
Ensure content type gets reset after render_to_string [ #1182 state:resolved]
2008-10-30 15:26:29 -05:00
David Heinemeier Hansson
7857e42103
Merge branch 'master' of git@github.com:rails/rails
2008-10-30 21:11:46 +01:00
Seth Fitzsimmons
47b4fa4a62
Fixed regex in redirect_to to fully support URI schemes [ #1247 state:committed]
...
Signed-off-by: David Heinemeier Hansson <david@loudthinking.com >
2008-10-30 21:07:50 +01:00
Joshua Peek
ec38c84ce1
Dup local assigns for partial collections so nil values doesn't get overwritten [ #1250 state:resolved]
2008-10-30 15:07:47 -05:00
Tarmo Tänav
ef53d91516
Don't rely on string CoreExtensions in StringInquirer since it is sometimes expected to work before the core extension are loaded
...
Signed-off-by: David Heinemeier Hansson <david@loudthinking.com >
2008-10-30 17:48:32 +01:00
Jordi Bunster
a9e8168432
Ensure indices don't flip order in schema.rb [ #1266 state:committed]
...
Signed-off-by: David Heinemeier Hansson <david@loudthinking.com >
2008-10-30 13:03:42 +01:00
Mathias Meyer
7418d367f0
Fixed plugin generator so that generated unit tests would subclass ActiveSupport::TestCase, also introduced a helper script to reduce the needed require statements. [ #1137 state:committed]
...
Signed-off-by: David Heinemeier Hansson <david@loudthinking.com >
2008-10-30 12:57:52 +01:00
David Heinemeier Hansson
dffc2e2b64
Fixed that ActiveResource#post would post an empty string when it shouldn't be posting anything (Paolo Angelini) [ #525 state:committed]
2008-10-30 12:47:23 +01:00
David Heinemeier Hansson
ea2545fd8d
Update the default deprecation message to not promise that theres more info at the Rails site [ #776 state:resolved]
2008-10-30 12:42:23 +01:00
David Heinemeier Hansson
a4b4463fca
Merge branch 'master' of git@github.com:rails/rails
2008-10-30 12:15:58 +01:00
Christopher Currie
f8f22dac8e
Update non-gems distributions to use sqlite3 as the default, matching the "rails" command default [ #1270 status:committed]
...
Signed-off-by: David Heinemeier Hansson <david@loudthinking.com >
2008-10-30 12:15:42 +01:00
Luca Guidi
47007c75af
Update prototype to 1.6.0.3
...
Signed-off-by: David Heinemeier Hansson <david@loudthinking.com >
2008-10-30 12:14:26 +01:00
Luca Guidi
a01f9f0723
Update prototype to 1.6.0.3
...
Signed-off-by: David Heinemeier Hansson <david@loudthinking.com >
2008-10-30 12:01:30 +01:00
David Heinemeier Hansson
8f0f078637
Make #destroy write 1 line into log (instead of 3) (Dmitry Sokurenko) [ #689 status:committed]
2008-10-29 10:53:33 +01:00
David Heinemeier Hansson
4dbfe18b37
Proper API for reloading translations
2008-10-29 10:51:56 +01:00
Ryan Bates
4ad5aa9a39
Ensure @content_for_* is checked before yielding to block in render :layout [ #8994 state:resolved]
...
Signed-off-by: Joshua Peek <josh@joshpeek.com >
2008-10-28 17:31:33 -05:00
Michael Koziarski
4684e76aef
Remove reload call from vendored gem. Breaks a bunch of stuff as Dispatcher isn't always defined.
...
This call will be moved into Dispatcher in a bit.
2008-10-28 21:55:59 +01:00
David Heinemeier Hansson
1b0afb31df
A few more style changes
2008-10-28 19:38:26 +01:00
David Heinemeier Hansson
d5b0ba6632
Make I18n::Backend::Simple reload its translations in development mode [DHH]
2008-10-28 19:28:51 +01:00
David Heinemeier Hansson
a61c4dfa70
Follow style conventions
2008-10-28 18:35:12 +01:00
David Heinemeier Hansson
1df157cd38
Merge branch 'master' of git@github.com:rails/rails
2008-10-28 17:10:52 +01:00
Joshua Peek
ac50ee0edf
Track rendered templates in stack so the current template can always be accessed. Added ActionView::Base#template to access the template object.
2008-10-28 11:06:08 -05:00
David Heinemeier Hansson
3e54a9a689
A little less hokus pokus
2008-10-28 16:51:08 +01:00
Joshua Peek
0f651aec4e
Thread Safety: Ensure recognize_optimized is immediately written instead of lazily
2008-10-27 12:34:54 -05:00
David Heinemeier Hansson
c94ba8150a
Fixed that serialized strings should never be type-casted (i.e. turning "Yes" to a boolean)(Andreas Korth) [ #857 state:committed]
2008-10-27 17:16:45 +01:00
Michael Koziarski
9e2bb2caff
Remove reference to fformat to restore support for postgres gem.
2008-10-26 20:04:09 +01:00
Erik Andrejko
ef9b6b5cba
modified current_page? to ignore extra parameters unless specified in options
...
Signed-off-by: Michael Koziarski <michael@koziarski.com >
[#805 state:committed]
2008-10-26 19:14:45 +01:00
David Heinemeier Hansson
2c7abe1b56
Fixed bug with asset timestamping when using relative_url_root (Joe Goldwasser) [ #1265 status:committed]
2008-10-26 16:50:18 +01:00
Adam Majer
932dffc559
Fix binary data corruption bug in PostgreSQL adaptor
...
1. Move the binary escape/unescape from column to the driver - we should store binary data AR just like most other adaptors
2. check to make sure we only unescape bytea data
PGresult.ftype( column ) == 17
that is passed to us in escaped format
PGresult.fformat( column ) == 0
Signed-off-by: Michael Koziarski <michael@koziarski.com >
[#1063 state:committed]
2008-10-25 12:54:48 +02:00
Mike Gunderloy
5c97d4ff29
"raise NoMethodError" raises NoMethodError. Raise it with NoMethodError.new instead.
...
Signed-off-by: Pratik Naik <pratiknaik@gmail.com >
2008-10-25 14:52:44 +05:30
Pratik Naik
5cf932344a
Fix typos in release notes
2008-10-25 04:34:09 +05:30
Pratik Naik
559178b80d
Update guides and release notes
2008-10-25 03:43:38 +05:30
Ken Miller
8a77c4abfa
Fixed issue where block is not called on the very first invocation of a find_or_create_by_ automatic finder.
...
[#1224 state:committed]
2008-10-24 21:35:05 +02:00
Pratik Naik
a17fc20eb1
Fix a typo
2008-10-24 18:05:52 +05:30
Pratik Naik
f8079b815b
Add some more info to the release notes
2008-10-24 18:00:01 +05:30
David Heinemeier Hansson
d224e6ccb1
Update CHANGELOGs with the last few fixes, set date for today
2008-10-24 13:08:47 +02:00
Jeffrey Hardy
3bcadc9290
Fix incorrect closing CDATA delimiter. Add tests for CDATA nodes.
...
Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net >
2008-10-23 19:16:26 -07:00
Jeffrey Hardy
1a18227261
Fix that HTML::Node.parse would blow up on unclosed CDATA sections.
...
If an unclosed CDATA section is encountered and parsing is strict, an
exception will be raised. Otherwise, we consider the remainder of the line to
be the section contents. This is consistent with HTML::Tokenizer#scan_tag.
Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net >
2008-10-23 19:16:12 -07:00
Jeremy Kemper
838cb1aa50
Skip collection ids reader optimization if using :finder_sql
2008-10-23 18:53:44 -07:00
David Heinemeier Hansson
5366e61458
Proper update call for gem server
2008-10-23 20:29:25 +02:00
David Heinemeier Hansson
ca7e4d71c2
Should be 2.2.0 as well
2008-10-23 20:23:01 +02:00
David Heinemeier Hansson
eec6e0cbbd
Push to new gem server
2008-10-23 20:18:11 +02:00
David Heinemeier Hansson
57c31a380e
Prepare for Rails 2.2.0 [RC1]
2008-10-23 20:14:20 +02:00
Pratik Naik
1a0e7390fc
Fix a typo in fxn's name
2008-10-23 19:26:52 +05:30
Pratik Naik
a8ba6773a7
Add release notes
2008-10-23 19:19:23 +05:30
Pratik Naik
896058b485
Merge with docrails
2008-10-22 23:14:00 +05:30
Pratik Naik
a03e2b356c
Merge with docrails. Also add a rake task to generate guides in your rails application :
...
rake doc:guides
The rake task will generate guides inside doc/guides directory of your application. Open index.html to browse.
2008-10-21 18:33:40 +01:00
David Heinemeier Hansson
18542c9e00
Dont try to auto-set the etag based on the body if any freshness headers have already been set [DHH/José Valim]
2008-10-21 16:58:12 +02:00
Pratik Naik
a5cdb7a813
Remove stuff that was deprecated in 2-1-stable
2008-10-21 11:34:56 +01:00
David Heinemeier Hansson
6fae0a0ec0
No use case handy for justifying fresh? any more
2008-10-21 10:20:30 +02:00
David Heinemeier Hansson
d85a7aecbb
Merge branch 'master' of git@github.com:rails/rails
2008-10-21 02:55:30 +02:00
David Heinemeier Hansson
448e7e7c04
Let fresh_when actually do the head(:not_modified). Cleaner and we get the filter halting for free then.
2008-10-21 02:54:55 +02:00
Pratik Naik
326036de46
Fix script/generate warning
2008-10-21 01:47:44 +01:00
David Heinemeier Hansson
68d84e2593
Merge branch 'master' of git@github.com:rails/rails
2008-10-21 02:30:57 +02:00
David Heinemeier Hansson
9acb88e666
Added stale?/fresh? and fresh_when methods to provide a layer of abstraction above request.fresh? and friends [DHH]
2008-10-21 02:30:13 +02:00
Matt Jones
326030a1e8
config.gem: Fix typo in unpack, skip dependencies on unloaded gems, and silence spec warnings on refresh. [ #1128 ]
...
Signed-off-by: Pratik Naik <pratiknaik@gmail.com >
2008-10-20 21:45:01 +01:00
Tim Harper
fcb45e5ec3
Ensure ActionView::Helpers::AssetTagHelper::AssetTag::Cache is cleared before loading so changes to asset files are picked up by the broswer [ #1233 state:resolved]
...
Signed-off-by: Joshua Peek <josh@joshpeek.com >
2008-10-20 13:21:59 -05:00
Geoff Garside
1082cba441
Bump active_support/vendor.rb tzinfo version number [ #1237 state:resolved]
2008-10-20 09:13:45 -05:00
gbuesing
c79f1d281f
TimeWithZone#freeze: preload instance variables so that we can actually freeze
2008-10-19 22:33:26 -05:00
gbuesing
93e1bff82a
Bundle TzInfo version 0.3.11
2008-10-19 22:06:32 -05:00
Pratik Naik
39e1911463
Expose default value of database connection pool in generated database.yml
2008-10-19 19:54:35 +01:00
Michael Koziarski
ba80ff74a9
Sanitize the URLs passed to redirect_to to prevent a potential response splitting attack.
...
CGI.rb and mongrel don't do any sanitization of the contents of HTTP headers, so care needs to be taken.
2008-10-19 15:24:18 +02:00
Daniel Schierbeck
de0ed534f6
Simplified the implementation of the :prefix option.
...
Signed-off-by: Michael Koziarski <michael@koziarski.com >
[#984 state:committed]
2008-10-19 13:42:57 +02:00
Daniel Schierbeck
32a58d2afc
Added documentation of the new :prefix option.
...
Signed-off-by: Michael Koziarski <michael@koziarski.com >
2008-10-19 13:42:52 +02:00
Daniel Schierbeck
0cb382cb6f
Moved test object instantiation to a setup method.
...
Signed-off-by: Michael Koziarski <michael@koziarski.com >
2008-10-19 13:42:52 +02:00
Daniel Schierbeck
ab2b1570fd
Made the :prefix option on Module#delegate accept a custom prefix.
...
Signed-off-by: Michael Koziarski <michael@koziarski.com >
2008-10-19 13:42:52 +02:00
Daniel Schierbeck
731c63f8eb
Added :prefix option to Module#delegate.
...
Signed-off-by: Michael Koziarski <michael@koziarski.com >
2008-10-19 13:42:52 +02:00
Michael Koziarski
6d1d48de6a
Memoize the require and construction of the StringInquirer
2008-10-19 13:26:36 +02:00
Pratik Naik
550fbccedd
Fix test warnings
2008-10-17 23:57:54 +02:00
Pratik Naik
ffbd7dd8ee
CHANGELOG entry for the previous commit ( 18e7bf2865)
2008-10-17 23:48:41 +02:00
Pratik Naik
18e7bf2865
Fix Brasilia timezone. [ #1180 state:resolved]
2008-10-17 23:43:26 +02:00
Pratik Naik
5384ba3081
Don't create test/performance/test_helper.rb. Just require the needed files from test directly. [ #1135 state:resolved]
2008-10-17 22:58:37 +02:00
Doug Barth
47be090d37
Skip tests that depend on memcached if not running.
...
Signed-off-by: Michael Koziarski <michael@koziarski.com >
2008-10-17 18:09:38 +02:00
Doug Barth
4b63c2700f
Bring MemCacheStore and CompressedMemCacheStore inline with expected counter manipulation semantics.
...
Signed-off-by: Michael Koziarski <michael@koziarski.com >
2008-10-17 18:09:27 +02:00
Doug Barth
c3d6205a4b
Fix cache counter semantics for MemoryCache, FileStoreCache, and (presumably) the DRbStore.
...
Signed-off-by: Michael Koziarski <michael@koziarski.com >
2008-10-17 18:09:26 +02:00
Pratik Naik
95c609357e
Ensure association proxy responds to private class methods defined in associated class. [ #1083 ]
2008-10-16 23:17:49 +02:00
Pratik Naik
9cb5400871
Merge docrails
2008-10-16 22:13:06 +02:00
Ian White
517bc500ed
Allow class methods to be sent (via #send) to association proxy (fix for bug introduced by 691aa20) [ #1083 ]
...
Signed-off-by: Pratik Naik <pratiknaik@gmail.com >
2008-10-16 10:41:48 +02:00
Michael Koziarski
09c1718198
Remove the class_path from the collisions test.
...
The class_path is often taken already in situations like Admin namespaces etc.
2008-10-14 21:59:55 +02:00
Michael Koziarski
3e9fc279e5
Avoid warnings by undefining the old method transliterate.
2008-10-14 21:24:34 +02:00
Michael Koziarski
e0993c6c37
Reverse the order of the iconv arguments to remain compatible with older rubies / iconvs.
...
[#1195 state:resolved]
2008-10-14 21:24:19 +02:00
Joshua Peek
9ab83b1cd1
Don't include the path when checking class collisions [ #545 state:resolved]
2008-10-13 21:43:58 -05:00
gbuesing
c51db4d7ab
Enhance testing for fractional days and weeks. Update changelog.
2008-10-13 20:18:56 -05:00
Tom Lea
a6e5d29e08
Added deprecated warning messages to Float#months and Float#years deprications.
2008-10-13 20:00:10 -05:00
Tom Lea
d599b80009
Deprecated Float#years and Float#months, moved Numeric#years and Numeric#months into Integer.
2008-10-13 20:00:09 -05:00
Tom Lea
27c70ff386
Time#advance recognizes fractional days and weeks [ #970 state:resolved]
2008-10-13 20:00:09 -05:00
David Heinemeier Hansson
1abdc8752d
Added inline builder yield to atom_feed_helper tags where appropriate (Sam Ruby) [ #8994 status:committed]
2008-10-13 19:52:37 +02:00
Pratik Naik
691aa20280
Ensure methods called on association proxies respect access control. [ #1083 state:resolved] [Adam Milligan, Pratik]
2008-10-13 19:02:34 +02:00
Matthew M. Boedicker
42cbd710bb
Add support for xml processing instructions in atom_feed_helper [ #926 state:resolved]
...
Signed-off-by: Pratik Naik <pratiknaik@gmail.com >
2008-10-13 18:46:32 +02:00
Eloy Duran
b47c76b1df
Make sure named routes with parameters can be used in tests before a request has been done. [ #1208 state:resolved]
...
Signed-off-by: Pratik Naik <pratiknaik@gmail.com >
2008-10-13 18:38:48 +02:00
Matt Jones
1b44bbff42
Initialize silence_spec_warnings
...
Signed-off-by: Michael Koziarski <michael@koziarski.com >
[#1128 state:resolved]
2008-10-13 17:27:31 +02:00
Matt Jones
9f15870946
Make VendorGemSourceIndex handle broken/missing specs generated by previous versions.
...
Signed-off-by: Michael Koziarski <michael@koziarski.com >
2008-10-13 17:27:25 +02:00
Dan Barry
0d4dbb3dfa
test nested hash with float
...
[#652 state:committed]
Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net >
2008-10-12 14:24:05 -07:00
Michael Koziarski
cb45ee344d
Remove the functionality introduce in 28d3390
...
There are several situations it doesn't cater for, and the inconsistency isn't worth blocking 2.2.
2008-10-10 17:04:46 +02:00
Will Bryant
4c05055487
explicitly including child associations that are also included in the parent association definition should not result in double records in the collection/double loads ( #1110 )
...
Signed-off-by: Michael Koziarski <michael@koziarski.com >
[#1110 state:committed]
2008-10-10 16:58:39 +02:00
Hongli Lai (Phusion)
28393e6e9c
Add documentation for AbstractAdapter#sanitize_limit, and make its code more readable.
...
Signed-off-by: Michael Koziarski <michael@koziarski.com >
[#1068 status:committed]
2008-10-09 18:11:10 +02:00
Matt Jones
aa4a7c3530
Fix script/console --sandbox warning. [ #1194 state:resolved]
...
Signed-off-by: Pratik Naik <pratiknaik@gmail.com >
2008-10-09 01:35:21 +01:00
Tarmo Tänav
d69b4b7bea
Made i18n simple backend able to store false values (and not confuse them with nil or lack of value)
...
Implemented support.array.skip_last_comma i18n key for
Array#to_sentence, this also tests the ability to store false.
Signed-off-by: Pratik Naik <pratiknaik@gmail.com >
2008-10-09 01:19:02 +01:00
Matt Jones
0dea211f44
Fix definition of find_name
...
Signed-off-by: Michael Koziarski <michael@koziarski.com >
[#1128 state:committed]
2008-10-08 17:36:53 +02:00
Matt Jones
2d644fd136
Mark gem as not loaded when spec not found
...
Signed-off-by: Michael Koziarski <michael@koziarski.com >
2008-10-08 17:36:52 +02:00
Tom Stuart
e28ad77bba
Allow use of :path_prefix and :name_prefix outside of namespaced routes. [ #1188 state:resolved]
...
Signed-off-by: Pratik Naik <pratiknaik@gmail.com >
2008-10-08 14:56:52 +01:00
Michael Koziarski
aec391621b
Make sure last_modified! works with <= rather than just equality.
2008-10-07 21:09:07 +02:00
Michael Koziarski
5556db22c5
Reduce memory usage slightly in String#parameterize
...
[#1034 state:committed]
2008-10-07 21:01:43 +02:00
Michael Koziarski
a4629e707d
Extract transliteration code to a seperate method.
...
Use iconv by default, but only when the transliteration is well behaved. When it isn't, fallback to mb_chars
2008-10-07 21:01:38 +02:00
Cody Fauser
f2c10f2756
Add ActiveResource::Base#to_xml and ActiveResource::Base#to_json methods. [ #1011 state:resolved]
...
Signed-off-by: Pratik Naik <pratiknaik@gmail.com >
2008-10-07 17:48:02 +01:00
Andrew Kaspick
dce6ade4cd
Ensure select_tag#name attribute uses [] when :multiple is true. [ #1146 state:resolved]
...
Signed-off-by: Pratik Naik <pratiknaik@gmail.com >
2008-10-07 15:17:22 +01:00
Tarmo Tänav
51b986619d
Implement submit_to_remote as a wrapper around a more generic button_to_remote
...
Removed the "return false" from submit_to_remote onclick end as
button input elements have no default behavior to cancel.
Signed-off-by: Pratik Naik <pratiknaik@gmail.com >
2008-10-07 00:12:20 +01:00
madlep
8e50f0f96e
Fix image_tag behavior on windows. [ #1085 state:resolved]
...
Signed-off-by: Pratik Naik <pratiknaik@gmail.com >
2008-10-06 23:43:41 +01:00
Manfred Stienstra
efb9ef65cc
Fix a typo in ActiveSupport::Multibyte::NORMALIZATION_FORMS. [ #1179 state:resolved]
...
Signed-off-by: Pratik Naik <pratiknaik@gmail.com >
2008-10-06 19:04:45 +01:00
Jeremy Kemper
5bc91b0592
Mark utf-8 source encoding
2008-10-06 10:56:56 -07:00
Eugene Pimenov
8603813ac6
Fix memoize_all for methods with punctuation [ #1175 state:resolved]
...
Signed-off-by: Joshua Peek <josh@joshpeek.com >
2008-10-05 17:25:58 -05:00
Chris Cherry
1c75b4fd42
Fix deprecated ActionController::Base.relative_url_root call in mongrel command
...
Signed-off-by: Joshua Peek <josh@joshpeek.com >
2008-10-05 17:25:57 -05:00
Pratik Naik
a2932784bb
Merge docrails
2008-10-05 22:16:26 +01:00
Matthew Moore
4df45d8609
ActiveResource can load array of strings, like serialize :bar, Array
...
Signed-off-by: rick <technoweenie@gmail.com >
[#1055 state:resolved]
2008-10-05 10:29:13 -07:00
Matt Jones
2bf58aa782
Fix a number of errors in the config.gem mechanism.
...
* Rails::GemDependency was missing definitions for hash and eql?, causing Array#uniq to not work.
* If several versions of a gem are unpacked in vendor, now chooses the highest if no version is specified.
* streamlined add_load_path. Now sets up Rubygems correctly to allow 'gem' to find frozen gems, with
gems frozen to vendor/gems and specifications in vendor/gems/<gem-name>/.specification
* Rails::GemDependency#specification would return a spec for the highest installed version, even for
frozen gems and/or previously loaded lower versions. See in part ticket #1123 .
* removed vendor from default_load_paths - it was causing autoloading to append Gems::Gems::<gem-dir> to
constant names
* added additional tests for loading frozen gems.
* incorporates the fix from #1107 for vendor rails
* defers to freeze:gems for handling the Rails framework. gems:unpack WILL NOT place a copy of Rails
in vendor/gems. Should close #1123 completely.
* incorporates, via using the gem loader for frozen gems, fixes corresponding to #227 , #324 , #362 , #527 , and #742 .
* gem plugins now work the same whether frozen or not. Correctness of the behavior is a matter for another ticket...
Signed-off-by: rick <technoweenie@gmail.com >
2008-10-05 10:16:17 -07:00
Pratik Naik
4f53db0096
Move controller ivar copying to a separate method
2008-10-05 14:01:00 +01:00
Pratik Naik
259a7a844b
Add tests for ActiveSupport::Rescuable. Use ActiveSupport::Rescuable in ActionController::Base.
2008-10-04 22:13:50 +01:00
Norbert Crombach
964dfc1557
First draft of ActiveSupport::Rescuable
...
Signed-off-by: Pratik Naik <pratiknaik@gmail.com >
2008-10-04 20:28:08 +01:00
Pratik Naik
9599948fbc
Ensure Model.sum and Model.avg typecast appropriately. [ #1066 state:resolved]
...
Model.sum delegates typecasting to the column being summed. If that's not feasible, returns a string.
Model.avg always returns big decimal.
2008-10-04 20:13:44 +01:00
Michael Koziarski
1dfebd4f0d
1.8 compatibility for random_number method on SecureRandom.
...
1.9 has its own version.
2008-10-04 21:11:30 +02:00
Michael Koziarski
923eb9569c
Fix mismatched assertions.
2008-10-04 21:11:30 +02:00
Pratik Naik
5e3517ea7b
Ensure rescue_from handlers are respected inside tests. [ #835 state:resolved]
...
Note : If you're not using rescue_from, you should overrider rescue_action_without_handler() method
and not rescue_action(). Afterwards, you can set request.remote_addr to a non "0.0.0.0" value for testing the
overridden behavior.
2008-10-04 18:43:46 +01:00
Pratik Naik
4918e6de98
Remove HasManyAssociationStrategy and move the logic to ActiveRecord::Reflection::ThroughReflection.
2008-10-04 17:49:39 +01:00
Pratik Naik
25ca21ae21
Introduce ActiveRecord::Reflection::ThroughReflection to simplify hm:t reflection logic
2008-10-04 17:49:39 +01:00
Zach Dennis
95e1cf4812
Fix has_many :through when the source is a belongs_to association. [ #323 state:resolved]
...
Signed-off-by: Pratik Naik <pratiknaik@gmail.com >
2008-10-04 17:49:39 +01:00
Lawrence Pit
7659fb6a2b
Try reloading model on class mismatch [ #229 state:resolved]
...
Signed-off-by: Pratik Naik <pratiknaik@gmail.com >
2008-10-04 17:49:38 +01:00
Aliaksey Kandratsenka
b437a7d34e
Return processing lock to dispatcher, the finer grained lock was incompatible with the reloading in development mode.
...
This commit also adds ActionController::Dispatcher#dispatch_unlocking -- non-locking version of dispatch.
It's named anologously to POSIX {getc,getchar,...}_unlocked functions.
Signed-off-by: Michael Koziarski <michael@koziarski.com >
[#1170 state:committed]
2008-10-04 18:25:08 +02:00
Aliaksey Kandratsenka
f550c86257
Fix performance bug in AttibuteMethods#respond_to? in handling of private methods
...
We have hit dramatic increase in tests time after upgrading rails.
Profiling revealed this particular place. After this fix our test times returned
back to norm.
Signed-off-by: Michael Koziarski <michael@koziarski.com >
[#1173 state:committed]
2008-10-04 17:48:13 +02:00
Aliaksey Kandratsenka
6080b73b1c
call clear_active_connections! in :after_dispatch to give pooled connections back
...
This fixes connection pool exhaustion for web servers which create new thread per connection (e.g. Webrick).
integration.rb changes are required to keep test transaction active for several requests.
Signed-off-by: Michael Koziarski <michael@koziarski.com >
[#1171 state:committed]
2008-10-04 17:48:13 +02:00
Aliaksey Kandratsenka
834361145a
made ConnectionPool#checkout more robust by trying to loot dead threads when pool is empty
...
Signed-off-by: Michael Koziarski <michael@koziarski.com >
[#1169 state:committed]
2008-10-04 17:48:13 +02:00
Aliaksey Kandratsenka
21eb18a70c
Fix race in ConnectionPool#checkout
...
After releasing monitor some connection(s) may appear in pool before monitor is re-aquired.
When this happens we'll wait for connection which is already available.
Signed-off-by: Michael Koziarski <michael@koziarski.com >
2008-10-04 17:48:13 +02:00
Aliaksey Kandratsenka
4cb3d27443
don't quote decimal values for mysql. It doesn't make sense and breaks in newer versions of mysql
...
Signed-off-by: Michael Koziarski <michael@koziarski.com >
[#1168 state:committed]
2008-10-04 17:48:13 +02:00
madlep
2def5b6314
Fixed load path for actionmailer and activesupport tests to always load from local lib files.
...
[#983 state:committed]
Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net >
2008-10-04 07:57:18 -07:00
Antonio Cangiano
f0e90740d0
Add IMB DB support to Rails application generator. [ #1136 state:resolved]
...
Usage : rails app_name -d ibm_db
Signed-off-by: Pratik Naik <pratiknaik@gmail.com >
2008-10-04 13:54:27 +01:00
Luca Guidi
1bc267d216
Make sure recreate MySQL test database with the proper encoding and collation [ #1165 state:resolved]
...
Signed-off-by: Michael Koziarski <michael@koziarski.com >
[#1165 state:committed]
2008-10-03 22:08:55 +02:00
Michael Koziarski
7553a23c0a
Remove AS for oracle compatibility
2008-10-03 21:35:01 +02:00
madlep
00e2ba76b2
added nicer failure reporting to #assert_difference to tell you the expression that failed rather than just the expected and actual values
...
Signed-off-by: Michael Koziarski <michael@koziarski.com >
[#1161 state:committed]
2008-10-03 21:31:56 +02:00
Nick Sieger
395369bc2b
Provide alternate implementation of Object#subclasses_of for JRuby
...
Signed-off-by: Michael Koziarski <michael@koziarski.com >
[#1144 state:committed]
2008-10-03 21:28:47 +02:00
Eloy Duran
8d337e9ec2
Dynamic finders should use the ActiveRecord::Base::find method instead of ::find_initial, :find_last, and ::find_all.
...
This is so when people override ActiveRecord::Base::find, the new ::find method will also be invoked by the dynamic finders.
Associations for instance do go through ::find, so this makes it more consistent.
Also removed the unnecessary deprecation silence blocks.
Signed-off-by: Michael Koziarski <michael@koziarski.com >
[#1162 state:committed]
2008-10-03 21:28:11 +02:00
David Masover
e69b506abd
Call controller_path instance method so it can be easily overridden [ #1141 state:resolved]
...
Signed-off-by: Joshua Peek <josh@joshpeek.com >
2008-09-30 12:07:21 -05:00
Michael Koziarski
0eefa7058a
Fix etag! and last_modified! to work as advertised.
...
Add tests too.
2008-09-30 17:00:38 +02:00
Michael Koziarski
0b46503254
Remove unneeded interning.
2008-09-30 11:34:05 +02:00
Will Bryant
35d731ef0a
fix eager loading's :condition sanitizing expanding against the wrong table
...
Signed-off-by: Michael Koziarski <michael@koziarski.com >
2008-09-29 17:49:44 +02:00
Will Bryant
8233f8314b
wrote a test showing eager loading's misbehavior (sanitizing against the wrong table) when the association has a :conditions hash
...
Signed-off-by: Michael Koziarski <michael@koziarski.com >
2008-09-29 17:49:44 +02:00
Andrew Kaspick
8c105ee0c8
Add options to field_set_tag
...
Signed-off-by: Michael Koziarski <michael@koziarski.com >
[#1116 state:committed]
2008-09-29 17:47:29 +02:00
Joshua Peek
28bf2fa038
Protect body ivar from being clobbered by the mailer template assigns
2008-09-28 12:31:45 -05:00
Tarmo Tänav
ea609b265f
Ignore all exceptions for validates_acceptance_of columns fetch so it can run even without a database connection
...
Signed-off-by: Michael Koziarski <michael@koziarski.com >
2008-09-26 20:09:39 +02:00
Adam Milligan
4d9a7ab5f5
Changed ActiveRecord attributes to respect access control.
...
Signed-off-by: Michael Koziarski <michael@koziarski.com >
[#1084 state:committed]
2008-09-24 19:40:07 +02:00
Michael Koziarski
a78ec93036
Partially revert 185fe2e9cc
...
We shouldn't quote the unpack command's requirement as it's passed through GemRunner which takes care of it for us.
2008-09-24 18:46:45 +02:00
Michael Koziarski
025736de8e
Use ActiveSupport::SecureRandom instead of the strange fallback code.
2008-09-24 16:24:02 +02:00
Hongli Lai (Phusion)
72b772ae9b
Refactor configure_dependency_for_has_many to use a few more methods.
...
Add an additional conditions option to make it slightly easier for certain plugins.
Signed-off-by: Michael Koziarski <michael@koziarski.com >
[#1087 state:committed]
2008-09-24 13:27:39 +02:00
Pivotal Labs
487758b3b8
Allowed passing arrays-of-strings to :join everywhere. Merge duplicate join strings to avoid table aliasing problems.
...
Signed-off-by: Michael Koziarski <michael@koziarski.com >
[#1077 state:committed]
2008-09-24 13:26:06 +02:00
Hongli Lai (Phusion)
70b8ea4fa6
Make AssociationCollection start transactions in the correct database.
...
AssociationCollection now starts transactions by calling
AssociationCollection#transaction instead of @owner.transaction or
@reflection.klass.transaction.
Signed-off-by: Michael Koziarski <michael@koziarski.com >
[#1081 state:committed]
2008-09-23 20:32:01 +02:00
adam
2e75bd0808
slice now returns indifferent hash if called on one
...
Signed-off-by: Michael Koziarski <michael@koziarski.com >
[#1096 state:committed]
2008-09-23 14:04:20 +02:00
adam
c452e49e76
Adds failed test case for slicing hash with indifferent access with symbol keys
...
Signed-off-by: Michael Koziarski <michael@koziarski.com >
2008-09-23 14:04:13 +02:00
Adam Cigánek
a4f2ba8fb3
Modified ActiveSupport::Inflector#parameterize with code from slugalizer ( http://github.com/henrik/slugalizer )
...
Handles trailing and leading slashes, and squashes repeated separators into a single character.
Signed-off-by: Michael Koziarski <michael@koziarski.com >
[#1034 state:committed]
2008-09-23 08:08:21 +02:00
Michael Koziarski
961e2b8610
Changelog entry for manfred's multibyte changes
2008-09-22 21:52:21 +02:00
Michael Koziarski
638bd19c7f
Merge branch 'patches' into multibyte
2008-09-22 21:35:35 +02:00
Michael Koziarski
5f86451a4c
Bump the Version constants to align with the *next* release rather than the previous release.
...
This allows people tracking non-release gems or git submodules to use the constants.
2008-09-22 21:32:12 +02:00
Martin Rehfeld
10380a22a6
Fixed AssetTag cache with with relative_url_root [ #1022 state:resolved]
...
Signed-off-by: Joshua Peek <josh@joshpeek.com >
2008-09-22 13:23:23 -05:00
Joshua Peek
900fd6eca9
Refactor AssetTagHelper and fix remaining threadsafe issues.
2008-09-22 13:12:32 -05:00
Jan De Poorter
050e58441b
Association#first and last should not load the association if not needed. [ #1091 state:resolved]
...
Signed-off-by: Pratik Naik <pratiknaik@gmail.com >
2008-09-22 18:22:30 +01:00
Hongli Lai (Phusion
46939a9b5a
Add Model#delete instance method, similar to Model.delete class method. [ #1086 state:resolved]
...
Signed-off-by: Pratik Naik <pratiknaik@gmail.com >
2008-09-21 22:53:44 +01:00
Manfred Stienstra
5795c509a7
Set encoding of the multibyte test helpers file to UTF-8 so the strings can be read by Ruby 1.9.
2008-09-21 18:31:15 +02:00
Manfred Stienstra
1585a7ed02
Change all calls to String#chars to String#mb_chars.
2008-09-21 18:01:15 +02:00
Manfred Stienstra
00a4286551
Change call to String#chars in inflector to String#mb_chars.
2008-09-21 17:51:01 +02:00
Manfred Stienstra
44e44b42d9
Deprecated String#chars in favor of String#mb_chars.
2008-09-21 17:47:19 +02:00
Manfred Stienstra
3c9eedec3c
Move multibyte test helpers to a separate file and make the conformance tests run again.
2008-09-21 17:37:38 +02:00
Manfred Stienstra
85c05b5394
Add tests for u_unpack to make sure it raises an EncodingError on invalid UTF-8 strings.
2008-09-21 17:30:45 +02:00
Manfred Stienstra
52f8c04e1e
Fix a test that assumes .mb_chars to always return an instance of the proxy_class.
2008-09-21 17:30:16 +02:00
Manfred Stienstra
809af7f558
Non-string results from forwarded methods should be returned vertabim.
2008-09-21 17:29:22 +02:00
Manfred Stienstra
b8eec5ac33
Remove special 1.9 version of excerpt helper.
2008-09-21 17:28:46 +02:00
Manfred Stienstra
bfc73852b1
Improve documentation.
2008-09-21 17:28:05 +02:00
Manfred Stienstra
7329990d86
Change all calls to String#chars to String#mb_chars. Remove a exception for Ruby <= 1.9.
2008-09-21 17:27:25 +02:00
Manfred Stienstra
8abef4fd0d
All methods which normally return a string now return a proxy instance.
2008-09-21 17:25:36 +02:00
Manfred Stienstra
520c3f33c3
Change all calls to String#chars to String#mb_chars.
2008-09-21 17:23:37 +02:00
Manfred Stienstra
0211722088
Move with_kcode helper to abstract_unit. Add tests for multibyte string extensions.
2008-09-21 17:22:55 +02:00
Manfred Stienstra
042fd97127
Add a test for ActiveSupport::Multibyte::Chars.consumes?.
2008-09-21 17:22:26 +02:00
Manfred Stienstra
22f75d539d
Simplify ActiveSupport::Multibyte and make it run on Ruby 1.9.
...
* Unicode methods are now defined directly on Chars instead of a handler
* Updated Unicode database to Unicode 5.1.0
* Improved documentation
2008-09-21 17:21:30 +02:00
Claudio Poli
5f83e1844c
Fixed missing template paths on exception [ #1082 state:resolved]
...
Signed-off-by: Joshua Peek <josh@joshpeek.com >
2008-09-20 22:57:45 -05:00
Adeh DeSandies
de96a8666d
applied patch to fix the associations with blocks in modules bug from an old trac ticket
2008-09-20 13:46:09 -07:00
rick
22e830f883
Merge branch 'master' of git@github.com:rails/rails
2008-09-20 13:00:20 -07:00
Sven Fuchs
a3b7fa78bf
I18n: Introduce I18n.load_path in favor of I18n.load_translations and change Simple backend to load translations lazily. [ #1048 state:resolved]
...
Signed-off-by: Pratik Naik <pratiknaik@gmail.com >
2008-09-20 19:26:16 +01:00
Sven Fuchs
8cb7d46043
I18n: move old-style interpolation syntax deprecation to Active Record. [ #1044 state:resolved]
...
Signed-off-by: Pratik Naik <pratiknaik@gmail.com >
2008-09-20 19:13:50 +01:00
Nathaniel Talbott
9d7f186f74
Fixed an error triggered by a reload followed by a foreign key assignment.
...
Signed-off-by: Michael Koziarski <michael@koziarski.com >
2008-09-20 14:16:43 +02:00
Carlos Brando
79f55de9c5
Fixed Time#end_of_quarter to not blow up on May 31st [ #313 state:resolved]
...
Signed-off-by: Joshua Peek <josh@joshpeek.com >
2008-09-19 09:06:35 -05:00
Michael Koziarski
2d27b82d4c
Remove the country_select helper.
...
We're in no position to mediate disputes on this matter, and the previous change to use ISO 3166 has offended just as many people as the ad-hoc list did.
If you want the old list back you can install the plugin:
ruby script/plugin install git://github.com/rails/country_select.git
2008-09-18 21:30:52 +02:00
Duff OMelia
e7cb8c844a
Ensure old buffers get properly cleared to avoid leaking memory
...
Signed-off-by: Joshua Peek <josh@joshpeek.com >
2008-09-18 08:51:19 -05:00
Edgar J. Suarez
790ebf8eab
HTTP Accept header
...
Signed-off-by: Michael Koziarski <michael@koziarski.com >
2008-09-18 11:15:48 +02:00
Pelle Braendgaard
7ecb9689b0
Added support for http_only cookies in cookie_store Added unit tests for secure and http_only cookies in cookie_store
...
Signed-off-by: Michael Koziarski <michael@koziarski.com >
[#1046 state:committed]
2008-09-17 13:20:16 +02:00
Philip Hallstrom
c47525a583
make db:migrate:redo rake task accept an optional VERSION to target that specific migration to redo
...
Signed-off-by: Michael Koziarski <michael@koziarski.com >
2008-09-17 11:14:21 +02:00
Michael Koziarski
4db7e8de11
Update the documentation to reflect the change handling :group earlier
2008-09-16 18:50:36 +02:00
Michael Koziarski
4dae3649f0
Enhance the test "some string" method to support creating 'pending' tests.
...
If no block is provided to the test method, a default test will be generated which simply flunks. This makes it easy for you to generate a list of what you intend to do, then flesh it out with actual tests.
2008-09-16 16:50:14 +02:00
miloops
dc8bf7515d
When counting grouped records the target should be loaded to return a valid groups count result.
...
Without this change count_records will group for the count in the query and return erroneous results.
Signed-off-by: Michael Koziarski <michael@koziarski.com >
[#937 state:committed]
2008-09-15 18:32:05 +02:00
gbuesing
157141b294
TimeWithZone #wday, #yday and #to_date avoid trip through #method_missing
2008-09-14 23:07:48 -05:00
gbuesing
cce7ae5466
Add thorough tests for Time-object #past?, #future? and #today. Fix TimeWithZone #today? to use #time instead of #utc for date comparison. Update changelog. [ #720 state:resolved]
2008-09-14 22:56:32 -05:00
Clemens Kofler
bfa12d7a02
Introduce convenience methods past?, today? and future? for Date and Time classes to facilitate Date/Time comparisons.
2008-09-14 21:21:19 -05:00
Frederick Cheung
f636c6fda0
stop AR's debug.log filling with warnings about not being able to load fixture classes
...
[#1045 state:committed]
Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net >
2008-09-14 18:57:39 -07:00
Frederick Cheung
d51a39ff50
Deal with MySQL's quirky handling of defaults and blob/text columns
...
[#1043 state:committed]
Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net >
2008-09-14 17:11:22 -07:00
gbuesing
d95943b276
Multiparameter attributes skip time zone conversion for time-only columns [ #1030 state:resolved]
2008-09-14 18:16:50 -05:00
miloops
9c4730d01e
Base.skip_time_zone_conversion_for_attributes uses class_inheritable_accessor, so that subclasses don't overwrite Base [ #346 state:resolved]
2008-09-14 17:18:17 -05:00
Michael Koziarski
d28c724b40
Make sure the permissions check file is closed before being unlinked.
...
[#1035 state:committed]
2008-09-14 09:44:29 +02:00
Pratik Naik
a17027d13a
Merge docrails
2008-09-13 20:28:01 +01:00
Mislav Marohnić
96055414d6
Ensure Hash#except is allowed on a frozen hash. References #382
...
Signed-off-by: Pratik Naik <pratiknaik@gmail.com >
2008-09-13 20:05:17 +01:00
Rich Cavanaugh
113de01eaf
Allow for the dirty tracking to work with the aliased name of aliased attributes.
...
Signed-off-by: Michael Koziarski <michael@koziarski.com >
[#812 state:committed]
2008-09-13 11:41:14 +02:00
Jon Leighton
fcf31cb752
Support for updating a belongs to association from the foreign key (without saving and reloading the record)
...
Signed-off-by: Michael Koziarski <michael@koziarski.com >
[#142 state:committed]
2008-09-13 11:08:29 +02:00
miloops
646b5bfa61
Use select and change test so new tests can work on postgres.
...
Signed-off-by: Michael Koziarski <michael@koziarski.com >
2008-09-12 12:27:03 +02:00
miloops
a37c5ae961
Improve test coverage when using the group option in find, has_many or has_and_belongs_to_many.
...
Signed-off-by: Michael Koziarski <michael@koziarski.com >
2008-09-11 22:51:57 +02:00
Michael Koziarski
095ad690f3
Remove the .to_s fix in validates_uniqueness_of, as Chars get quoted correctly.
2008-09-11 22:51:57 +02:00
Manfred Stienstra
babbc1580d
Fix ActiveRecord::Base.quote_bound_value for ActiveSupper::Multibyte::Chars values.
...
- Adds String#acts_like_string?
- Adds Chars#acts_like_string?
Signed-off-by: Michael Koziarski <michael@koziarski.com >
[#1029 state:committed]
2008-09-11 22:51:26 +02:00
wmoxam
923f4ecad2
Fixes validates_uniquness_of problem with case insensitive string containing newline characters
...
Signed-off-by: Michael Koziarski <michael@koziarski.com >
2008-09-11 17:40:14 +02:00
miloops
c98cb8ffc2
Add --debugger option to script/console.
...
Signed-off-by: Michael Koziarski <michael@koziarski.com >
[#1025 state:committed]
2008-09-11 17:12:00 +02:00
Michael Koziarski
1ddde91303
Flesh out the parameterize method to support non-ascii text and underscores.
2008-09-11 17:10:17 +02:00
Jamis Buck
46bac29de7
Add the Asia/Colombo definition from the tzinfo gem
2008-09-11 08:33:39 -06:00
Michael Koziarski
9460d45988
Add missing assert_deprecated calls to prevent spam during test runs
2008-09-11 11:21:22 +02:00
Sven Fuchs
e826c99201
add activerecord tests to make sure the deprecated %s and %d interpolation syntax still works
...
[#1016 state:committed]
Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net >
2008-09-10 19:28:36 -07:00
Sven Fuchs
31dcd78111
add activerecord tests for deprecation of %s and %d in error messages (and translations in general)
...
Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net >
2008-09-10 19:28:36 -07:00
Sven Fuchs
79c8b104d6
change activerecord validation tests to not use the deprecated interpolation syntax any more
...
Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net >
2008-09-10 19:28:36 -07:00
Joshua Peek
70a4f6c2dd
Switched computed public paths cache over to a simple hash w/ mutex
2008-09-10 19:05:53 -05:00
Joshua Peek
2ba9ca95f9
Removed monitor from MemoryStore and created a seperate threadsafe store called SynchronizedMemoryStore
2008-09-10 18:56:03 -05:00
rsl
6ce13429cb
fixed association preloading to use = instead of IN when there's only one record
...
[#1013 state:committed]
Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net >
2008-09-10 14:11:00 -07:00
Jamis Buck
5bbca48c22
Fix Sri Jayawardenepura time zone to map to Asia/Colombo
2008-09-10 13:32:10 -06:00
Jeremy Kemper
c19c0e7872
Disable warnings in AP tests
2008-09-10 11:03:32 -07:00
Pratik Naik
9994f0d902
Revert "Add :accessible option to Associations for allowing mass assignments using hash. [ #474 state:resolved]"
...
This reverts commit e0750d6a5c .
Conflicts:
activerecord/CHANGELOG
activerecord/lib/active_record/associations.rb
activerecord/lib/active_record/associations/association_collection.rb
2008-09-10 18:50:01 +01:00
Rob Anderton
b518b6c0d3
Expanded documentation for new composed_of options
...
Signed-off-by: Michael Koziarski <michael@koziarski.com >
[#892 state:committed]
2008-09-10 18:28:57 +02:00
Rob Anderton
2cee51d5c1
Added :constructor and :converter options to composed_of and deprecated the conversion block
...
Signed-off-by: Michael Koziarski <michael@koziarski.com >
2008-09-10 18:28:47 +02:00
Tarmo Tänav
7c9851dbb6
Support :limit on update_all so that has_many with :limit can be safely updated
...
Signed-off-by: Michael Koziarski <michael@koziarski.com >
2008-09-10 13:41:49 +02:00
Tarmo Tänav
14d1560e85
Fixed test_find_last_by_one_attribute_caches_dynamic_finder for postgresql 8.3
...
Signed-off-by: Michael Koziarski <michael@koziarski.com >
2008-09-10 13:40:45 +02:00
Sven Fuchs
a18ed6d563
Added ActionController::Translation module delegating to I18n #translate/#t and #localize/#l [status:committed #1008 ]
...
Signed-off-by: David Heinemeier Hansson <david@loudthinking.com >
2008-09-10 00:39:54 -05:00
David Heinemeier Hansson
c55565b032
Merge branch 'master' of git@github.com:rails/rails
2008-09-10 00:37:04 -05:00
David Heinemeier Hansson
90366a1521
Added Inflector#parameterize for easy slug generation ("Donald E. Knuth".parameterize => "donald-e-knuth") #713 [Matt Darby]
2008-09-10 00:36:37 -05:00
David Heinemeier Hansson
b8e8be83e9
Added Inflector#parameterize for easy slug generation ("Donald E. Knuth".parameterize => "donald-e-knuth") #713 [Matt Darby]
2008-09-10 00:26:50 -05:00
Alastair Brunton
b141624abb
Added image_submit_tag confirm option [status:committed #784 ]
...
Signed-off-by: David Heinemeier Hansson <david@loudthinking.com >
2008-09-10 00:13:35 -05:00
Jose Fernandez
184cf27b12
The FormTagHelper#submit_tag helper will now pass along the original value of the submit button to the params if the :disable_with option is used [status:committed #633 ]
...
Signed-off-by: David Heinemeier Hansson <david@loudthinking.com >
2008-09-10 00:02:23 -05:00
David Heinemeier Hansson
6dc9173a63
Missing doc updates
2008-09-09 23:59:54 -05:00
Antonio Cangiano
854cf3d721
Fix for SQLite's db creation warnings [status:committed #614 ]
...
Signed-off-by: David Heinemeier Hansson <david@loudthinking.com >
2008-09-09 23:56:37 -05:00
miloops
567392bff3
Added find_last_by dynamic finder [status:committed #762 ]
...
Signed-off-by: David Heinemeier Hansson <david@loudthinking.com >
2008-09-09 23:44:52 -05:00
U-ESCAPEE\Mack
f3f7d166d8
Fixed problem causes by leftover backup templates ending in tilde [state:committed #969 ]
...
Signed-off-by: David Heinemeier Hansson <david@loudthinking.com >
2008-09-09 23:29:29 -05:00
David Heinemeier Hansson
704fc3785e
No local variable in the global namespace plz
2008-09-09 23:13:37 -05:00
David Heinemeier Hansson
23a0e2c4a9
Fixed that REXML fix would break on earlier versions of ruby (Frederick Cheung) [state:resolved #987 ]
2008-09-09 23:07:34 -05:00
David Heinemeier Hansson
cc17863709
Revert "Remove the Version check as it's not always available."
...
This reverts commit 6e2851d426 .
2008-09-09 23:05:09 -05:00
David Heinemeier Hansson
c5b65b4905
Only separate loggings with a comma when there are actually two statements
2008-09-09 22:42:49 -05:00
David Heinemeier Hansson
6233628ba0
Stopped logging template compiles as it only clogs up the log
2008-09-09 22:10:39 -05:00
David Heinemeier Hansson
dc8b21dc3c
Dont reference the class being tested when it can be assumed
2008-09-09 17:59:34 -05:00
David Heinemeier Hansson
6228220c9b
Revert "Revert "Add layout functionality to mailers.""
...
This reverts commit 36c6aa01ee .
2008-09-09 17:25:09 -05:00
David Heinemeier Hansson
36c6aa01ee
Revert "Add layout functionality to mailers."
...
This reverts commit e9a8e0053b .
2008-09-09 17:20:55 -05:00
Hongli Lai (Phusion)
1398db0128
Add special AssociationReflection methods for creating association objects, and modify the code base to use those methods instead of creating association objects directly. This allows plugins to hook into association object creation behavior.
...
[#986 state:resolved]
Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net >
2008-09-09 13:13:12 -07:00
Hongli Lai (Phusion)
1692940441
Make the options that has_many, belongs_to and other association generation methods can accept, configurable.
...
[#985 state:resolved]
Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net >
2008-09-09 12:50:32 -07:00
Michael Koziarski
07913788f9
Interpolation requires double quotes
2008-09-09 21:16:06 +02:00
Akira Matsuda
5f7c42413b
Ruby 1.9 compat: remove instance variables and global variables from block parameters
...
[#1000 state:resolved]
Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net >
2008-09-09 10:35:53 -07:00
Akira Matsuda
8e68ec4dcc
Ruby 1.9 compat: use String#lines instead of to_a in Ruby 1.9
...
[#1001 state:resolved]
Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net >
2008-09-09 10:35:24 -07:00
Akira Matsuda
07eb9ffd15
Ruby 1.9 compat: remove constants from block parameters
...
[#1002 state:resolved]
Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net >
2008-09-09 10:07:59 -07:00
Jeremy Kemper
d5893a517f
Merge branch 'master' of git@github.com:rails/rails
2008-09-09 09:49:33 -07:00
Michael Koziarski
6e2851d426
Remove the Version check as it's not always available.
2008-09-09 10:38:07 +02:00
Jeremy Kemper
dc0411fad7
Check for uninitialized instance variables
2008-09-08 19:57:32 -07:00
Jeremy Kemper
8b4461c1a4
Check whether memoized ivar is initialized
2008-09-08 19:43:52 -07:00
Jeremy Kemper
fd71a1a354
Remove recognized_optimized method before redefining it
2008-09-08 19:42:20 -07:00
Jeremy Kemper
3c658512a1
Use defined? check since @view_paths may be uninitialized
2008-09-08 19:41:57 -07:00
Jeremy Kemper
1b94d5dc65
Fix indentation mismatch
2008-09-08 18:10:23 -07:00
Jeremy Kemper
dc0aed1151
Don't shadow arg with block var
2008-09-08 18:08:48 -07:00
Jeremy Kemper
621f48edb2
BigDecimal to_s and yaml housekeeping
2008-09-08 18:06:58 -07:00
Jeremy Kemper
4f6875296f
Revert "Revert "Raise UnknownAttributeError when unknown attributes are supplied via mass assignment""
...
This reverts commit 41efd73887 .
2008-09-08 09:45:26 -07:00
Matt Jones
7e6cda15f8
Ensure routing optimizations are cleared when new routes are added [ #981 state:resolved]
...
Signed-off-by: Joshua Peek <josh@joshpeek.com >
2008-09-07 10:21:34 -05:00
Jeremy Kemper
41efd73887
Revert "Raise UnknownAttributeError when unknown attributes are supplied via mass assignment"
...
This reverts commit 108db00aa9 .
2008-09-06 21:01:45 -07:00
Jeremy Kemper
15b1b2b778
Ruby 1.9 compat: use method_defined? instead of instance_methods.include? Don't encourage args abuse by flattening.
2008-09-06 18:45:52 -07:00
David Heinemeier Hansson
227ee2ecb4
Use a more sensible resolution on the new millisecond benchmarks
2008-09-05 14:58:34 +02:00
David Heinemeier Hansson
de0e7507de
Changed all benchmarking reports to be in milliseconds
2008-09-05 14:22:57 +02:00
David Heinemeier Hansson
cf0467c642
Use copy instead of export for release
2008-09-05 14:22:56 +02:00
Jeremy Kemper
1156bbc06c
Merge branch 'master' of git@github.com:rails/rails
2008-09-04 17:20:24 +02:00
Jeremy Kemper
cd498e2588
Rescue spurious failures in case dummy postgresql user or schema already exists
2008-09-04 17:20:07 +02:00
Michael Koziarski
ca5ffd10b9
Handle connection timeouts with a slightly nicer error message.
2008-09-04 17:02:04 +02:00
Jeremy Kemper
17628ecfce
Deprecate %d and %s in message interpolation, but only in the bundled i18n lib.
2008-09-04 16:46:12 +02:00
Nick Sieger
0d9e238cc9
Remove flawed execute("ROLLBACK") approach; #reset! defaults to nothing
...
Will need community help to fill out what #reset! should do for each adapter
Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net >
2008-09-04 15:45:00 +02:00
Nick Sieger
a3f12f575d
Default connection allow_concurrency to false (for PostgreSQL)
...
Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net >
2008-09-04 15:44:05 +02:00
Michael Koziarski
2c62baf4bf
Handle the case where there is no ivar set.
...
This happens on jruby due to a bug, but also on historically marshalled data.
2008-09-04 15:09:30 +02:00
Nick Sieger
7ba2872615
Deprecate verification_timeout and verify before reset
...
Signed-off-by: Michael Koziarski <michael@koziarski.com >
2008-09-04 14:36:09 +02:00
Jeremy Kemper
f54be2cb31
Fix transaction exception test
2008-09-04 13:24:55 +02:00
Jeremy Kemper
039d78a7d8
still need to track whether we're the toplevel transaction
2008-09-04 13:17:00 +02:00
Jeremy Kemper
045713ee24
PostgreSQL: introduce transaction_active? rather than tracking activity ourselves
2008-09-04 12:17:56 +02:00
Tarmo Tänav
671bbd962e
Don't run 32bit dependant assertions in 64bit environments
...
Signed-off-by: Michael Koziarski <michael@koziarski.com >
2008-09-04 10:11:06 +02:00
Pratik Naik
6ef35461dc
Merge docrails
2008-09-03 17:58:47 +01:00
Adam Keys
10fe6a6d89
Add each_with_object from 1.9 for a more convenient alternative to inject.
...
Signed-off-by: Michael Koziarski <michael@koziarski.com >
[#962 state:committed]
2008-09-03 16:21:53 +02:00
Nigel Ramsay
b36d000975
Inline help text was incorrectly telling user to uncomment line to use default local time. User should comment the line to use default local time.
...
Signed-off-by: Michael Koziarski <michael@koziarski.com >
[#960 state:committed]
2008-09-03 09:04:42 +02:00
Clemens Kofler
d3ccfe414d
Whitespace.
...
Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net >
2008-09-03 00:55:55 +02:00
Clemens Kofler
288e947ae1
Some performance goodness for inheritable attributes.
...
Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net >
2008-09-03 00:55:23 +02:00
Clemens Kofler
4d092ba208
Some performance goodness for AR.
...
Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net >
2008-09-03 00:55:23 +02:00
Clemens Kofler
a377c9853c
Some performance goodness for AM Validations.
...
Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net >
2008-09-03 00:55:23 +02:00
Clemens Kofler
b42f53ca1f
Some performance goodness for AM StateMatchine.
...
Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net >
2008-09-03 00:55:23 +02:00
Clemens Kofler
948ed34600
Some performance goodness for routing.
...
Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net >
2008-09-03 00:55:23 +02:00
Clemens Kofler
ba3ecf53b4
Some performance goodness for AR associations.
...
Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net >
2008-09-03 00:55:22 +02:00
Clemens Kofler
1646e8c364
More symbols for send and respond_to?.
...
Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net >
2008-09-03 00:55:22 +02:00
Clemens Kofler
a978701f86
More symbols for send and respond_to?.
...
Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net >
2008-09-03 00:55:22 +02:00
Clemens Kofler
abebdf52a3
Use symbols for send and respond_to?.
...
Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net >
2008-09-03 00:55:22 +02:00
Clemens Kofler
2e240f0eac
Removed unnecessary Symbol#to_proc from Asset Tag Helper.
...
Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net >
2008-09-03 00:55:22 +02:00
Jonathan del Strother
6cfb70023a
Don't set Content-Length on 304 responses
...
Commit 8aad8c claimed to do this, but it checks for the 304 status too early, before handle_conditional_get! has overridden it.
[#958 state:resolved]
Signed-off-by: Jonathan del Strother <jon.delStrother@bestbefore.tv >
Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net >
2008-09-02 22:57:40 +02:00
Jeremy Kemper
6f932b4790
Database connections are now pooled, one pool per #establish_connection call.
...
Pools start out empty and grow as necessary to a maximum size (default is 5,
configure size with key 'pool' in your database configuration). If no
connections are available, a thread will wait up to a 'wait_timeout' time
(default is 5 seconds).
Connections are verified and reset when checked out from the pool (usually
upon first access to ActiveRecord::Base.connection), and returned back to the
pool after each request.
If you would like to use connection pools outside of ActionPack, there is an
ActiveRecord::Base.connection_pool method that gives you access to the pool,
and you can manually checkout/checkin connections, or supply a block to
ActiveRecord::Base.connection_pool.with_connection which takes care of the
checkout/checkin for you.
[#936 state:resolved]
2008-09-02 18:32:54 +02:00
Michael Koziarski
ebfa43c423
Merge rexml-expansion-fix gem into activesupport.
...
Addresses the security issue documented at:
* http://www.ruby-lang.org/en/news/2008/08/23/dos-vulnerability-in-rexml/
2008-09-02 16:22:20 +02:00
Iain Hecker
76797b4439
translates when a message symbol has been set on builtin validations
...
Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net >
2008-08-31 13:24:08 -07:00
Jeremy Kemper
a1eb4e11c2
Get rid of 'Object#send!'. It was originally added because it's in Ruby 1.9, but it has since been removed from 1.9.
...
Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net >
Conflicts:
actionpack/test/controller/layout_test.rb
2008-08-31 13:20:15 -07:00
Pratik Naik
e9a8e0053b
Add layout functionality to mailers.
...
Mailer layouts behaves just like controller layouts, except layout names need to
have '_mailer' postfix for them to be automatically picked up.
2008-08-31 19:17:42 +01:00
Luke Melia
7ce03db778
Fixes optimised named routes generating question mark followed by nothing when provided an empty hash as the last argument.
...
Signed-off-by: Michael Koziarski <michael@koziarski.com >
[#481 state:committed]
2008-08-31 19:42:01 +02:00
Joshua Peek
086c3520c4
Moved layout exemption logic into the view
2008-08-31 11:34:46 -05:00
Joshua Peek
8eec694598
Prefix ActionView::Base private methods with an underscore
2008-08-31 10:50:43 -05:00
Pratik Naik
56c2b02f59
Fix AM tests and add tests for rendering logging
2008-08-31 16:29:21 +01:00
Pratik Naik
cdda7defa0
Add lost log messages about template rendering
2008-08-31 15:41:02 +01:00
Pratik Naik
a13d335461
Move layout rendering logic to ActionView::Base
2008-08-31 15:23:45 +01:00
Jeremy Kemper
c50223b76f
Fix tests that assumed implicit order by id
2008-08-30 22:47:28 -07:00
Pratik Naik
a59a3db1f3
Move copying ivar logic from ActionController::Base to ActionView::Base
2008-08-31 03:48:09 +01:00
miloops
6183e55f71
Use reflection primary_key instead of id for when selecting association ids.
...
[#906 state:resolved]
Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net >
2008-08-30 17:39:30 -07:00
miloops
367a55e1b8
Allow prototype functions to receive position parameter as a symbol.
...
[#887 state:resolved]
Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net >
2008-08-30 16:35:25 -07:00
Pratik Naik
cb25c4e584
Remove unused use_full_path argument
2008-08-31 00:18:10 +01:00
Jeremy Kemper
f7d9e09eee
Merge branch 'master' of git@github.com:rails/rails
2008-08-30 15:49:56 -07:00
miloops
b163d83b8b
Performance: Better query for ASSOCIATION_ids. Select only ids if the association hasn't been loaded.
...
Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net >
2008-08-30 15:24:09 -07:00
Pratik Naik
4fb75392aa
Add test to make sure RJS block inside controller is executed in view context
2008-08-30 21:47:35 +01:00
Pratik Naik
e12abb6e8a
Dont pass controller partial layout option to view
2008-08-30 20:18:54 +01:00
Pratik Naik
afea4c9b0e
Remove double layout check
2008-08-30 19:35:29 +01:00
Pratik Naik
83c6ba1889
Add support for shallow nesting of routes. [ #838 state:resolved]
...
Adds :shallow option to resource route definition. If true, paths for nested
resources which reference a specific member (ie. those with an :id parameter)
will not use the parent path prefix or name prefix.
Example :
map.resources :users, :shallow => true do |user|
user.resources :posts
end
* GET /users/1/posts (maps to PostsController#index action as usual)
named route "user_posts" is added as usual.
* GET /posts/2 (maps to PostsController#show action as if it were not nested)
Additionally, named route "post" is added too.
2008-08-30 15:20:20 +01:00
Sven Fuchs
be4ae1f526
I18n: applied Luca Guidi's patch for better #interpolate performance
...
[#943 state:resolved]
Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net >
2008-08-30 02:02:33 -07:00
Nathaniel Bibler
efa6620a2a
Added optional rake doc:app TITLE environment parameter
...
[#939 state:resolved]
Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net >
2008-08-29 21:04:04 -07:00
Rasik Pandey
16b9a554db
Format related patches to support serializing data out in the correct format with correct http request headers per http method type [ #450 state:resolved]
...
Signed-off-by: Tarmo Tänav <tarmo@itech.ee >
Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net >
2008-08-29 18:45:39 -07:00
miloops
11eb29f60a
Make assert_select_rjs code more readable, make use of unused constants and use more simple Regexps.
...
[#540 state:resolved]
Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net >
2008-08-29 17:52:26 -07:00
Tarmo Tänav
6450d6ca76
Added button_to_remote helper
...
Ticket originally from http://dev.rubyonrails.org/ticket/3641
Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net >
2008-08-29 16:22:01 -07:00
Jeremy Kemper
5a6e20b607
Fix test to not assume which thread finishes first
2008-08-29 15:59:56 -07:00
Hongli Lai (Phusion)
204a8cce88
Move some core extension methods into a module under the ActiveSupport::CoreExtensions namespace, instead of extending core classes directly. This is more friendly for API reference generators.
...
[#915 state:resolved]
Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net >
2008-08-29 15:15:40 -07:00
Tom Stuart
7f179f8540
Make NamedScope#size behave identically to AssociationCollection#size. [ #933 state:resolved]
...
Signed-off-by: Pratik Naik <pratiknaik@gmail.com >
2008-08-29 22:18:49 +01:00
Joshua Peek
c0361344d9
1.9: methods need to be coerced into strings
2008-08-29 15:43:07 -05:00
James Mead
3cf773b187
ActionMailer should respond_to? to methods handled by method_missing [ #700 state:resolved]
...
Signed-off-by: Joshua Peek <josh@joshpeek.com >
2008-08-29 15:09:47 -05:00
Michael Koziarski
99492bad88
Use a set for the named scope methods not a big regexp.
2008-08-29 21:12:37 +02:00
Nick Sieger
300754509b
Minor tweak to retrieve_connection_pool -- recurse instead of loop
2008-08-29 14:12:13 -05:00
Nick Sieger
113cc4e1c4
Remove some synchronization that's probably overkill, assuming one doesn't establish connections frequently
2008-08-29 14:12:13 -05:00
Nick Sieger
c1b949869c
Remove call to active_record.allow_concurrency since it's deprecated
2008-08-29 14:12:13 -05:00
Nick Sieger
8e5e02bdad
Collapse connection pool class hierarchy; YAGNI.
...
- Add connection checkin and checkout callbacks to adapter to allow
adapter-specific customization of behavior (e.g., JRuby w/ JNDI)
2008-08-29 14:12:12 -05:00
Nick Sieger
d07a6b1a4a
Make clear_active_connections! also return stale connections back to the pool
...
- also clean up some cruft remaining from per-thread connection cache
2008-08-29 14:12:12 -05:00
Nick Sieger
212134dce1
Remove CachedConnectionPerThread per-thread pooling mechanism in favor of a fixed pool with default maximum of 5 connections
2008-08-29 14:12:12 -05:00
Nick Sieger
ca6d71753f
Deprecate allow_concurrency and make it have no effect
2008-08-29 14:12:12 -05:00
Nick Sieger
a96b7d4c33
Add connection reset and verification upon each connection checkout
2008-08-29 14:12:12 -05:00
Nick Sieger
d7d2d73d88
Fix typo: was using brackets instead of parens. Must need more sleep.
2008-08-29 14:12:11 -05:00
Nick Sieger
1712e37c90
Favor existing connections over new ones if available
2008-08-29 14:12:11 -05:00
Nick Sieger
817a07b451
More doco and class/method renames. Now have a strategy for integration with ActionPack.
2008-08-29 14:12:11 -05:00
Nick Sieger
3ce64d4f16
Fix checkin method, add a couple more tests
2008-08-29 14:12:11 -05:00
Nick Sieger
fe575dd4a9
Nearing the finish line. Initial fixed-size connection pool implemented, more docs
2008-08-29 14:12:11 -05:00
Nick Sieger
82fcd9d85f
Clean up the code, get rid of reserve/release, add some more docs
2008-08-29 14:12:10 -05:00
Nick Sieger
029952edf4
Extract a base class for connection pools, start to flesh out reserve/release API
2008-08-29 14:12:10 -05:00
Nick Sieger
51349ec873
Add readme stating intentions of the work
2008-08-29 14:12:10 -05:00
Nick Sieger
72d959d9b5
Split connection handler into single- and multiple-thread versions.
2008-08-29 14:12:10 -05:00
Nick Sieger
ff97e9d029
Connection handling methods extracted out into separate ConnectionHandler class
...
- delegating methods left behind
2008-08-29 14:12:10 -05:00
Nick Sieger
3151d96663
Revert "Change all databases.rake adapter 'when' statements to use regexes."
...
This reverts commit 3d2512d38d2e28b3ea669139f7c7b0307522aa72.
2008-08-29 14:12:09 -05:00
Nick
37b0b36918
Fix failure to retain value of allow_concurrency
...
- Also carry allow_concurrency value through to connection adapter
(for postgresql)
2008-08-29 14:12:09 -05:00
Nick
cab76ce6ac
Add synchronization to connection pool also
2008-08-29 14:12:09 -05:00
Nick
50cd4bdc99
Introduce synchronization around connection pool access
...
- use new active support Module#synchronize
- allow_concurrency now switches between a null monitor and a
regular monitor (defaulting to null monitor to avoid overhead)
2008-08-29 14:12:09 -05:00
Nick
b185d157fe
Module#synchronize: Add testcase to ensure that singleton methods can be wrapped
2008-08-29 14:12:09 -05:00
Nick
9dc4f66110
Add method punctuation handling to #synchronize
2008-08-29 14:12:09 -05:00
Nick
3eb68248e0
Adds Module#synchronize for easier method-level synchronization.
2008-08-29 14:12:08 -05:00
Nick
5879b15f23
Rename defined_connections to connection_pools
...
- Distinguis meaning of "active_connections" to always mean connections
associated with the current thread
2008-08-29 14:12:08 -05:00
Nick
6edaa26717
Initial conversion to connection pool
...
So far so good, tests still run clean. Next steps: synchronize connection pool access
and modification, and change allow_concurrency to simply switch a real lock for a
null lock.
2008-08-29 14:12:08 -05:00
Nick
1a81f156bd
Change all databases.rake adapter 'when' statements to use regexes.
...
This is more friendly to JRuby/JDBC adapters (with names like 'jdbcmysql')
and leaves the door open to alternate implementations of adapters in the
future.
2008-08-29 14:12:08 -05:00
Tom Lea
db26b47b9f
Ensure that calling content_tag_for in a helper doesn't cause duplicate output.
...
Signed-off-by: Michael Koziarski <michael@koziarski.com >
[#871 state:committed]
2008-08-29 20:52:01 +02:00
Tim Haines
d0b949d873
Improve assert_select_rjs failure messages for show, hide, toggle, and remove
...
Signed-off-by: Michael Koziarski <michael@koziarski.com >
[#931 state:committed]
2008-08-29 20:51:47 +02:00
Joshua Peek
a200c67611
Merge RenderTest and NewRenderTest
2008-08-29 13:26:28 -05:00
Eugene Pimenov
743f0e7114
Make case insensitive validates_uniqueness_of use unicode aware downcase method.
...
Signed-off-by: Michael Koziarski <michael@koziarski.com >
2008-08-29 20:24:20 +02:00
Nick Sieger
a9086b3daa
Make query-cache thread-local
...
Signed-off-by: Joshua Peek <josh@joshpeek.com >
2008-08-29 10:21:39 -05:00
Michael Koziarski
6769d824f9
Fix parentheses warnings
2008-08-29 15:27:34 +02:00
Jan De Poorter
db116a2ed6
Fix NamedScope regex so methods containing "an" get delegated to proxy_found. [ #901 state:resolved]
...
Signed-off-by: Pratik Naik <pratiknaik@gmail.com >
2008-08-29 14:06:37 +01:00
Pratik Naik
6577942b61
Deprecate render_component.
...
Please install render_component plugin from http://github.com/rails/render_component/tree/master
if your application uses this functionality.
2008-08-29 13:43:30 +01:00
Jeremy Kemper
85070b5e56
Date#freeze bug doesn't affect Ruby 1.9
2008-08-28 22:36:10 -07:00
Jeremy Kemper
c94f6ea2f3
Date#freeze bug doesn't affect Ruby 1.9
2008-08-28 22:27:55 -07:00
Jeremy Kemper
766fb54c8f
Fix indentation
2008-08-28 12:35:47 -07:00
Jeremy Kemper
082c377954
Missed changelog update for #501
2008-08-28 12:32:38 -07:00
Brennan Dunn
9cc8c0a0a1
Routes may be restricted to lists of HTTP methods instead of a single method or :any.
...
[#407 state:resolved]
Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net >
2008-08-28 12:29:49 -07:00
Brennan Dunn
7bdd5b768e
Accept an array of method symbols for collection/member actions of resources
...
Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net >
2008-08-28 12:23:39 -07:00
Andrew White
db22c89543
Merge scoped :joins together instead of overwriting them. May expose scoping bugs in your code!
...
[#501 state:resolved]
Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net >
2008-08-28 12:07:15 -07:00
Ernie Miller
44af2efa2c
Refactored AssociationCollection#count for uniformity and Ruby 1.8.7 support.
...
[#831 state:resolved]
Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net >
2008-08-28 11:58:25 -07:00
Jeremy Kemper
ce4d13861d
Merge branch 'master' of git@github.com:rails/rails
2008-08-28 11:47:06 -07:00
Joshua Peek
acbf2b74aa
Deprecated implicit local assignments when rendering partials
2008-08-28 10:37:46 -05:00
Michael Koziarski
8b6870cfae
Prevent deprecation warning in the tests
2008-08-28 12:47:18 +02:00
Bradford Folkens
293f99700d
Reinstate Range#step default argument.
...
[#595 state:resolved]
Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net >
2008-08-27 23:48:54 -07:00
Tarmo Tänav
96c6fe0842
Implement count limit/offset support for has_many associations
...
[#348 state:resolved]
Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net >
2008-08-27 23:32:21 -07:00
Tarmo Tänav
13671cc565
Alias included associations if needed when doing a count
...
[#302 state:resolved]
Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net >
2008-08-27 23:29:29 -07:00
Tom Lea
ad562c58ea
Dirty: treat two changes resulting in the original value as being unchanged.
...
[#798 state:resolved]
Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net >
2008-08-27 23:13:41 -07:00
Ken Collins
f277e1d8fd
Added TextHelper#current_cycle to return the current cycle for better design options.
...
[#417 state:resolved]
Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net >
2008-08-27 23:06:20 -07:00
Michael S. Klishin
e42a235dd1
Request#remote_ip handles the uncommon case that REMOTE_ADDR is a comma-separated list.
...
[#523 state:resolved]
Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net >
2008-08-27 23:03:11 -07:00
Lars Kanis
c2068d14d2
PostgreSQL: fix quote_string for certain old pg drivers. [ #94 state:resolved]
2008-08-27 22:51:10 -07:00
Jeremy Kemper
a444c78212
respond_to? passes along splat args to avoid introducing the second arg if it was omitted
2008-08-27 21:32:51 -07:00
Tim Haines
82778351a8
Add TestUploadFile.content_type= to match Request.UploadedFile
...
[#920 state:resolved]
Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net >
2008-08-27 18:50:29 -07:00
Jeremy Kemper
657898c821
Merge commit 'sven/i18n'
...
Conflicts:
activesupport/lib/active_support.rb
2008-08-27 12:31:07 -07:00
Joshua Peek
87fafe4074
Moved Logger extensions into core_ext
2008-08-27 11:33:18 -05:00
Luca Guidi
ce65a05c5b
Fix Ruby's Time marshaling bug in pre-1.9 versions of Ruby: utc instances are now correctly unmarshaled with a utc zone instead of the system local zone [ #900 state:resolved]
2008-08-27 08:57:36 -05:00
Michael Koziarski
b7cd4ded93
Formally deprecate the old secret key generator
2008-08-27 15:18:07 +02:00
Hongli Lai (Phusion
b3411ff59e
Deprecate Rails::SecretKeyGenerator in favor of ActiveSupport::SecureRandom.
...
SecureRandom has a few minor security enhancements and can be used as a drop-in replacement
Signed-off-by: Michael Koziarski <michael@koziarski.com >
[#913 state:committed]
2008-08-27 15:08:16 +02:00
Marko Seppae
cba83ede5d
I18n: remove #populate from Simple backend as well
2008-08-27 12:00:14 +02:00
pivotal
9dbde4f5cb
Fix two has_one :through errors
...
* Set the association target on assignment;
* Reset target to nil on reset, rather than empty array.
Signed-off-by: Michael Koziarski <michael@koziarski.com >
[#895 state:committed]
2008-08-27 11:22:15 +02:00
Marko Seppae
2d03a4c668
i18n: fixed failing tests after removing #populate and #store_translations
2008-08-27 10:37:01 +02:00
Marko Seppae
0fcd5b5466
I18n: removed call to #populate from main library files
2008-08-27 10:36:00 +02:00
Marko Seppae
44de71ba94
I18n: removed #populate and #store_translations from api
2008-08-27 10:16:25 +02:00
Joshua Peek
6ec07e0737
Store application and other context specific helper modules in ActionView::Base#helpers
2008-08-26 16:17:58 -05:00
Joshua Peek
cd91a8d3ad
defined? has no bounds
2008-08-26 15:21:06 -05:00
Joshua Peek
9853134b4f
Require missing libraries and check for defined ActionController constant so ActionView can be used standalone
2008-08-26 15:13:28 -05:00
Joshua Peek
8756dd75b2
Performance: reduce garbage created by ActiveRecord::Calculations#column_alias_for
2008-08-26 14:24:52 -05:00
rick
0aef9d1a26
Merge branch 'master' of git@github.com:rails/rails
2008-08-26 11:53:33 -07:00
Joshua Peek
229eedfda8
Cache JavaScriptGenerator's helper module set on the template
2008-08-26 12:17:55 -05:00
Hongli Lai (Phusion
c111522d5b
The 'rails' command was broken by the last commit. Fix that.
...
Signed-off-by: Michael Koziarski <michael@koziarski.com >
2008-08-26 16:28:41 +02:00
Hongli Lai (Phusion
f9f1ab4e3d
When an unexpected exception is caught, tell the administrator to read the log file for more information about the error. This should make things less confusing for developers who are new to Rails.
...
Signed-off-by: Michael Koziarski <michael@koziarski.com >
2008-08-26 14:30:19 +02:00
Tarmo Tänav
eec5eb2e44
Fix yet another implicit order dependant test
...
Signed-off-by: Michael Koziarski <michael@koziarski.com >
2008-08-26 13:16:55 +02:00
Tarmo Tänav
3dfecfe773
Print the queries that were executed if assert_queries fails
2008-08-26 12:45:04 +02:00
Michael Koziarski
bb557b44e9
Be more careful
2008-08-26 12:21:48 +02:00
Michael Koziarski
86bf279b89
Re enable CI for postgresql
2008-08-26 12:14:07 +02:00
Tarmo Tänav
ce3c76de7c
Just look at sql_type when testing that the correct database-specific type was used
...
Signed-off-by: Michael Koziarski <michael@koziarski.com >
2008-08-26 12:11:01 +02:00
Jeremy Kemper
e06878c22b
Merge branch 'master' of git@github.com:rails/rails
2008-08-26 03:04:14 -07:00
Tarmo Tänav
00d2165f74
Back to fetching all versions in ruby instead of letting SQL do it as it's difficult to get all databases to convert the text value to a number with the same SQL
...
Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net >
2008-08-26 03:00:36 -07:00
Jeremy Kemper
ab1e82b8f7
Include people and readers fixtures to fix test isolation error
2008-08-26 02:38:48 -07:00
Jeremy Kemper
0c7bbc72fc
fix tests relying on implicit ordering
2008-08-26 02:17:36 -07:00
Jeremy Kemper
b319e69ecb
PostgreSQL: pg driver expects nil instead of empty string for missing user/pass
2008-08-26 01:54:14 -07:00
Jeremy Kemper
d2d739fd06
Merge branch 'master' of git@github.com:rails/rails
2008-08-26 01:50:32 -07:00
Tarmo Tänav
973c0ef26d
Create mysql binary_fields table with latin1 character set as with utf8 all the limits would have to be divided by 3 to get the expected text types
...
Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net >
2008-08-26 01:49:19 -07:00
Jeremy Kemper
11612bf956
Merge branch 'master' of git@github.com:rails/rails
2008-08-26 00:55:25 -07:00
Tarmo Tänav
fa795ccfad
Include mysql older than 5.1.23 in the 5.1 series in the list of those that can't handle NULL defaults
...
Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net >
2008-08-26 00:53:19 -07:00
Chad Woolley
289e3b9072
use double quotes
2008-08-26 09:40:19 +02:00
Jeremy Kemper
52e15abbed
um.. yeah
2008-08-26 00:10:16 -07:00
Jeremy Kemper
6d66ddaa34
typo
2008-08-26 00:02:30 -07:00
Jeremy Kemper
842d55cb16
fix another ordering failure
2008-08-26 00:02:22 -07:00
Jeremy Kemper
ca48da6300
fix tests relying on implicit ordering
2008-08-25 23:53:31 -07:00
Josh Susser
1092c181b5
add dynamic finder bang version to raise RecordNotFound
...
[#905 state:resolved]
Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net >
2008-08-25 23:33:16 -07:00
Josh Susser
143f5fbb21
refactor dynamic finder name matching into its own class
...
Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net >
2008-08-25 23:32:20 -07:00
Jeremy Kemper
3beed9cdb7
ensure tests load sibling Active Support instead of a gem
2008-08-25 23:32:03 -07:00
Tarmo Tänav
77b003fb61
Use DECIMAL instead of INTEGER when casting as mysql doesn't work with just "INTEGER" and other databases don't like "UNSIGNED" which mysql requires
...
And don't mask exceptions.
Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net >
2008-08-25 23:23:34 -07:00
Tarmo Tänav
3d2ac918b9
Cache migrated versions list in Migrator and use it to fetch the latest migrated version name [ #845 state:resolved]
...
Also optimized Migrator#current_version class method to fetch
only the latest version number and not all of them.
With this change no matter how many migrations there are the
schema_migrations table is only SELECTed from once.
Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net >
2008-08-25 22:03:47 -07:00
Jeremy Kemper
4bcd64c9e9
Ruby 1.9 compat: switch profile_options to superclass_delegating_accessor
2008-08-25 22:01:02 -07:00
Tarmo Tänav
a445cdd884
Load the first and not the last has_one result when doing join-based eager loading
...
This matters when the has_one is defined with an order in which case
there is an expectation that the first one will be loaded.
[#904 state:resolved]
Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net >
2008-08-25 21:23:35 -07:00
Frederick Cheung
2dbda11945
Implement old-skool eagerloading for has_one :through
...
Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net >
2008-08-25 21:23:15 -07:00
Jeremy Kemper
172606e21f
Harmonize framework require strategy. Don't add self to load path since Rails initializer and RubyGems handle it.
2008-08-25 21:22:34 -07:00
Frederick Cheung
b7a37b742c
Fix preloading of has_one through associations
...
[#903 state:resolved]
Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net >
2008-08-25 20:49:55 -07:00
Joshua Peek
f2d8d13c64
Performance: Cache modules that extend the view context for JavaScriptGenerator
2008-08-25 21:50:26 -05:00
Joshua Peek
ba0d621695
Include all helpers into ActionView::Helper
2008-08-25 21:50:26 -05:00
Jeremy Kemper
e5cad34916
strip trailing whitespace
2008-08-25 18:16:58 -07:00
Jeremy Kemper
1c54ca4f75
Ruby 1.9 compat: fix test error masked by old String#each behavior
2008-08-25 18:16:21 -07:00
Jeremy Kemper
5e1ceb153c
Work around frozen Date memoization
2008-08-25 17:05:50 -07:00
Joshua Peek
a916c2e3d3
The view context always responds to controller, check if controller available instead
2008-08-25 15:37:19 -05:00
Joshua Peek
fe2640549b
Base path may be nil if template is at the root of the view path
2008-08-25 15:36:11 -05:00
Sven Fuchs
49859b0bb1
I18n: fix activerecord i18n test for classy backend
2008-08-25 11:48:03 +02:00
Sven Fuchs
43a0012e50
Merge branch 'i18n' of git@github.com:svenfuchs/rails into i18n
2008-08-25 11:43:44 +02:00
Sven Fuchs
d0a4d9b73a
Update translations for pluralization key change from 'many' to 'other'
2008-08-25 11:41:51 +02:00
Sven Fuchs
84d8957e04
Update translations for pluralization key change from 'many' to 'other'
2008-08-25 11:25:59 +02:00
Sven Fuchs
a61e87aeb9
update i18n gem
2008-08-25 11:20:24 +02:00
Sven Fuchs
e464f9b6b9
Merge commit 'rails/master' into i18n
2008-08-25 11:11:08 +02:00
Sven Fuchs
90a9637d41
I18n: add aliases #t and #l to TranslationHelper#translate and #localize
2008-08-25 11:06:18 +02:00
Chad Woolley
fb20d6f09d
properly reference geminstaller config under ci dir
2008-08-25 10:34:01 +02:00
Jeremy Kemper
8a4d7233aa
Update translations for pluralization key change from 'other' to 'many'
2008-08-24 11:10:15 -07:00
Jeremy Kemper
950ea33242
Fix test to assign the module instead of a new instance
2008-08-24 11:08:49 -07:00
Jeremy Kemper
3c52c4c12b
Merge branch 'master' of git@github.com:rails/rails
2008-08-24 11:08:25 -07:00
Chad Woolley
337b043c93
Include the CI configuration and setup instructions.
...
This should make it easy to set up your own copy of the CI environment, and easier for us to keep ours running.
2008-08-24 16:27:20 +02:00
Michael Koziarski
33ed19f428
Merge branch 'patches'
2008-08-24 14:34:47 +02:00
Xavier Noria
e02f0dcc24
Rollback the transaction when a before_* callback returns false.
...
Previously this would have committed the transaction but not carried out save or destroy operation.
[#891 state:committed]
Signed-off-by: Michael Koziarski <michael@koziarski.com >
2008-08-24 14:34:24 +02:00
Michael Koziarski
eb2b81c766
Reverse the priority of the mysql commands in dbconsole
2008-08-24 13:20:23 +02:00
Jeremy Kemper
bb3dd6ad2e
Ruby 1.9 compat: update bundled i18n lib
2008-08-23 21:51:06 -07:00
Jeremy Kemper
53e2e8ef2b
Merge branch 'master' into i18n
2008-08-23 21:41:18 -07:00
Jeremy Kemper
c471f13db6
Ruby 1.9 compat: Hash is now flattenable, so explicitly exclude it
2008-08-23 21:26:14 -07:00
Jeremy Kemper
2efdeb7a95
Ruby 1.9 compat: set source encoding
2008-08-23 16:06:54 -07:00
Jeremy Kemper
92a7239a3d
Ruby 1.9: silence some warnings for block args shadowing local vars
2008-08-23 16:03:00 -07:00
Jeremy Kemper
e7127be365
Ruby 1.9: constantize takes advantage of new inherit arg to const_get and const_defined?
2008-08-23 15:59:59 -07:00
Sven Fuchs
d6989aa0e1
I18n: use :other instead of :many as default key for pluralization to better conform w/ cldr pluralization rules
...
Signed-off-by: Michael Koziarski <michael@koziarski.com >
2008-08-23 21:23:00 +02:00
Tarmo Tänav
b1f3c6e6ec
Generate belongs_to association when generating a model
2008-08-23 21:54:43 +03:00
Tarmo Tänav
9223a91911
Generate belongs_to associations automatically for 'references' types [ #640 state:resolved]
2008-08-23 20:58:44 +03:00
Sven Fuchs
23fb26a0dc
I18n: use :other instead of :many as default key for pluralization to better conform w/ cldr pluralization rules
2008-08-23 19:43:57 +02:00
Peter Wagenet
a652c300ac
New inflectors will overwrite defaults [ #337 state:resolved]
...
Signed-off-by: Tarmo Tänav <tarmo@itech.ee >
2008-08-23 20:43:22 +03:00
Tarmo Tänav
74c3c701f7
Don't set "NULL" as a constraint on nullable columns [ #398 state:resolved]
...
This is already the default and adding it breaks SQL standards compatibility.
2008-08-23 19:51:09 +03:00
Tarmo Tänav
5232d81281
Pass class through to DeprecatedConstantProxy target
...
This is needed because include_all_modules_from checks
calls "class" on every constant and sometimes it can
hit deprecated constants which aren't even Modules,
but while checking for it deprecation warnings are shown.
2008-08-23 19:12:14 +03:00
Tarmo Tänav
cf28109158
Always require activesupport, even if its constant already exists
...
This is needed because the existance of the ActiveSupport
constant by itself does not guarantee that the whole library
has been loaded.
Also load the StringInquirer in the Rails#env method as
the it might be called inside the initializer block
before activesupport itself has been loaded.
2008-08-23 18:05:52 +03:00
Tarmo Tänav
b5c4c7daf8
Clear prefix_parameters cache when setting prefix
2008-08-23 17:43:52 +03:00
Josh Susser
e48e77e022
coerce blank strings to nil values for boolean and integer fields
...
[#860 state:resolved]
2008-08-22 16:26:40 -07:00
Tarmo Tänav
707ee0e269
Made migrations transactional for PostgreSQL [ #834 state:resolved]
...
Patch originally from http://dev.rubyonrails.org/ticket/5470
2008-08-22 14:46:25 -07:00
Jeremy Kemper
9dac5547ad
Merge branch 'master' into i18n
2008-08-22 13:01:53 -07:00
Jeremy Kemper
a6e05b18d6
Merge commit 'sven/i18n' into i18n
2008-08-22 12:44:14 -07:00
Joshua Peek
c0dd0cee46
Removed old deprecation test because the warning was removed in 1129a24
2008-08-22 13:43:34 -05:00
Ryan Bates
9a5ffaa01e
Ensure :partial => @collection and :collection => @collection behaves same. [ #884 state:resolved]
...
Signed-off-by: Pratik Naik <pratiknaik@gmail.com >
2008-08-22 18:15:53 +01:00
Chris Lloyd
4e4277b9e0
Fixed that rake doc:plugins to uses UTF-8. [ #573 state:resolved]
...
Signed-off-by: Pratik Naik <pratiknaik@gmail.com >
2008-08-22 13:36:47 +01:00
Amos King
381210daa0
camelize(:lower) should always downcase first character. [ #696 state:resolved]
...
Signed-off-by: Pratik Naik <pratiknaik@gmail.com >
2008-08-22 13:31:13 +01:00
Tom Ward
89d1c77dd0
Initializer to sort files before eager loading. [ #859 state:resolved]
...
Changed Rails::Initializer to sort files before eager loading them. This ensures that
any files in a parent directory will be loaded before files in a subdirectory of the
'same' name. i.e. zoo.rb will be loaded before zoo/reptile_house.rb
Signed-off-by: Pratik Naik <pratiknaik@gmail.com >
2008-08-22 13:06:34 +01:00
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
ab33b27947
Merge branch 'master' of git@github.com:rails/rails
2008-08-21 22:13:45 -07: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
Joshua Peek
0096f55869
Removed template_public? because it will always be true since the default template is never a partial
2008-08-21 21:34:03 -05:00
Joshua Peek
ba516b40f5
Tidy up pick partial template logic
2008-08-21 21:25:33 -05:00
Adrian Mugnolo
893fb5bb63
Add ActiveResource::Base.find(:last). [ #754 state:resolved]
...
Signed-off-by: Pratik Naik <pratiknaik@gmail.com >
2008-08-22 03:06:57 +01:00
Ryan Bates
1129a24caf
Cleanup around partial rendering
...
Signed-off-by: Joshua Peek <josh@joshpeek.com >
2008-08-21 21:03:33 -05:00
Jeremy Kemper
e6a66cbd05
update rack tests for default response content_type and charset
2008-08-21 18:16:16 -07:00
Jeremy Kemper
b99442933d
deprecate Base#assign_default_content_type_and_charset
2008-08-21 18:14:32 -07:00
Jeremy Kemper
f8f077945f
Move default content type and charset from Base to Response. Handle charset = nil.
2008-08-21 18:11:09 -07:00
Jeremy Kemper
aab2f0b353
Merge branch 'master' of git@github.com:rails/rails
2008-08-21 17:50:06 -07:00
Tarmo Tänav
98fb161dbb
Allow polymorphic_url helper to take url options. [ #880 state:resolved]
...
All *_polymorphic_url, *_polymorphic_path helpers can now accept
an options hash which will be passed on to the named route
making it possible to generate polymorphic routes with additional
url parameters.
Signed-off-by: Pratik Naik <pratiknaik@gmail.com >
2008-08-21 20:26:00 +01:00
Frederick Cheung
654c41255d
Mark Class as not being duplicable. [ #829 state:resolved]
...
Signed-off-by: Pratik Naik <pratiknaik@gmail.com >
2008-08-21 18:40:20 +01: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
Sven Fuchs
aad429a46e
Merge branch 'master' into i18n
2008-08-21 19:04:39 +02:00
Iain Hecker
cf6840773b
Custom error messages scope improved
2008-08-21 18:40:44 +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
Darragh Curran
7e4ea5f4a2
Allow overriding id for feed and entry with atom_feed_builder. [ #485 state:resolved]
...
Signed-off-by: Pratik Naik <pratiknaik@gmail.com >
2008-08-21 13:37:26 +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
6be8251ec8
Simplified and renamed CallbackChain union method to replace_or_append!
2008-08-21 00:51:06 -05:00
Joshua Peek
f388725bd6
Partial revert of 2681685 premature TypeArray abstraction
2008-08-21 00:28:25 -05:00
Miles Georgi
09343166ac
PostgreSQL: fix transaction bug that can occur if you call change_column with invalid parameters
...
[#861 state:resolved]
2008-08-20 13:25:49 -07:00
Joshua Peek
47cd8b81cc
Switched integration test runner to use Rack processor instead of CGI
2008-08-20 13:37:18 -05:00
Joshua Peek
a74dbe6c52
Improve test coverage for integration tests cookie header
2008-08-20 13:22:36 -05:00
Sven Fuchs
c324ef2785
Merge branch 'iain' into i18n
2008-08-20 18:44:41 +02:00
Sven Fuchs
950b9792ba
fixing actionpack yml translations
2008-08-20 18:44:18 +02:00
Iain Hecker
7ee01c8c54
Changed locale file to yml for actionpack, but still broken
2008-08-20 18:04:36 +02:00
Iain Hecker
72366398b2
Removed en-US ruby locale in favor of yaml
2008-08-20 18:01:13 +02:00
Iain Hecker
c1e0d8aa48
Locale file changed to yaml
2008-08-20 18:01:12 +02:00
Iain Hecker
febe2ea977
Locale file changed to yaml
2008-08-20 18:01:12 +02:00
Iain Hecker
fc0358ae16
Added :value as interpolation variable available to error messages
2008-08-20 17:57:53 +02:00
Sven Fuchs
e43cdb93f0
fix activerecord i18n_test to work with backend classes
2008-08-20 17:57:46 +02:00
Iain Hecker
12d7872071
Introduced AR::Base.human_name to validations
2008-08-20 17:53:04 +02:00
Iain Hecker
81e14fada1
Added Base.human_name method
2008-08-20 17:53:04 +02:00
Sven Fuchs
a2d67403ac
remove warning in i18n gem
2008-08-20 17:52:54 +02:00
Sven Fuchs
a6a62004c9
add human_name and value to ar validation #generate_message
2008-08-20 17:51:42 +02:00
Iain Hecker
e2b191681e
Added :value as interpolation variable available to error messages
2008-08-20 17:41:43 +02:00
Iain Hecker
c531248938
Introduced AR::Base.human_name to validations
2008-08-20 17:39:43 +02:00
Iain Hecker
ae8a35d8f6
Added Base.human_name method
2008-08-20 17:39:43 +02:00
Joshua Peek
3a2ff17af6
Don't shadow query string method
2008-08-19 20:24:34 -05:00
Joshua Peek
6f530de944
Test coverage for integration testing with parameters
2008-08-19 20:15:51 -05:00
Joshua Peek
5de340e79f
Ensure objects cached with MemoryStore are immutable
2008-08-19 19:20:10 -05:00
Ryan Bates
a8ece12fe2
Return nil instead of a space when passing an empty collection or nil to 'render :partial' [ #791 state:resolved]
...
Signed-off-by: Joshua Peek <josh@joshpeek.com >
2008-08-19 19:09:04 -05:00
Joshua Peek
71c4ff07ab
Delegate xhr helper method to integration session
2008-08-19 18:53:46 -05:00
Joshua Peek
5df8ff1d6b
Touch file with git revision when freezing edge
2008-08-19 17:16:35 -05:00
Jamis Buck
6e4ea66dc0
Make AbstractRequest.if_modified_sense return nil if the header could not be parsed
2008-08-19 16:07:17 -06:00
Joshua Peek
bd7edcf286
Removed config.ru template from app generator
2008-08-19 16:46:15 -05:00
Joshua Peek
977317da55
hack around CGI session close
2008-08-19 16:29:02 -05:00
Sven Fuchs
c379582064
switch to class and instance instead of a module for the simple backend
2008-08-19 14:25:51 +02:00
Joshua Peek
e9ae2b2f4c
Added rack logger middleware that tails the environment log
2008-08-19 00:18:26 -05:00
Joshua Peek
96ab01e8f2
Maintain a seperate buffer for each thread
2008-08-18 23:36:13 -05: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
Joshua Peek
a4da8175a2
Replace MemoryStore mutex with a monitor to avoid issues with nested calls
2008-08-18 20:17:08 -05:00
Jeremy Kemper
cd8e653d5b
Performance: freeze cached rows instead of duping
2008-08-18 17:34:38 -07:00
Jeremy Kemper
7fbe226de5
Ruby 1.9 and GC::Profiler updates
2008-08-18 16:41:08 -07:00
Ryan Bates
38c7d73e73
pass yielded arguments to block for ActionView::Base#render with :layout [ #847 state:resolved]
...
Signed-off-by: Joshua Peek <josh@joshpeek.com >
2008-08-17 19:29:24 -05:00
Joshua Peek
dbb0abfb7e
More integration test coverage
2008-08-17 19:18:18 -05:00
Joshua Peek
f245658495
Use Response status accessor instead of the Status header
2008-08-17 19:13:49 -05:00
Joshua Peek
b8e930aa01
Merge RackProcess#normalize_headers logic into AbstractResponse#prepare!
2008-08-17 19:09:38 -05:00
Joshua Peek
894f9ccc53
Use RackRequest as a mock instead of StubCGI into RequestTest
2008-08-17 19:04:01 -05: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
David Heinemeier Hansson
aad7cac6ad
Fixed problems with the logger used if the logging string included %'s [ #840 state:resolved] (Jamis Buck)
2008-08-15 09:27:07 -05:00
Jeremy Kemper
8aad8cb390
Set cache control to require revalidation if cache freshness response headers are set. Don't set Content-Length header if 304 status.
2008-08-14 21:45:14 -07:00
Jeremy Kemper
f1f4e84a7e
Fix asset file paths with dangling queries in mtime check
2008-08-14 12:28:02 -07:00
Iain Hecker
ffeab4e0c1
Cleaned up ActiveRecord i18n scoping
2008-08-14 10:48:33 +02:00
Joshua Peek
8cb14ee120
Ensure results returned by a memoized method are immutable
2008-08-13 21:30:46 -05:00
Joshua Peek
b8b30985d5
Marshal FileStore values
2008-08-13 20:57:26 -05:00
Jeremy Kemper
c7e09a8fb2
TestRequest#recycle! uses unmemoize_all to reset cached request method, accepts, etc.
2008-08-13 17:26:27 -07:00
Jeremy Kemper
3fc9a67c04
memoize_ and unmemoize_all
2008-08-13 17:26:27 -07:00
S. Brent Faulkner
3284fbb866
Use current umask when testing the expected file mode [ #823 state:resolved]
...
Signed-off-by: Joshua Peek <josh@joshpeek.com >
2008-08-13 19:19:00 -05:00
Joshua Peek
3b9324e62f
Fix rendering partials at the top level [ #795 state:resolved]
2008-08-13 19:15:35 -05:00
Joshua Peek
04248c6208
Ensure templates are rendered if all the parts are already processed
2008-08-13 19:04:56 -05:00
Josh Susser
2561be005b
Refactor Filter predicate methods to use inheritance. [ #815 state:resolved]
...
Signed-off-by: Pratik Naik <pratiknaik@gmail.com >
2008-08-13 21:48:37 +01: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
Sven Fuchs
d0ee883e7c
fixing unit tests for active_record validations_i18n
2008-08-13 14:02:26 +02:00
Sven Fuchs
e3ecc3375f
provide more useful feedback on missing translations for validation error messages
2008-08-13 13:52:07 +02:00
Sven Fuchs
906e79396b
fix bug in I18n::Backend::Simple (A default array of non-existant keys returns the default array)
2008-08-13 13:43:02 +02:00
Jeffrey Hardy
282b420213
Account for the possibility of a nil options argument to CompressedMemCacheStore#read/#write
2008-08-13 04:19:31 -07:00
Sven Fuchs
78677cf6af
update activesupport/vendor i18n gem
2008-08-13 11:42:02 +02:00
Sven Fuchs
aae9f91659
fix validations_i18n tests for changed locale file format
2008-08-13 10:00:54 +02:00
Sven Fuchs
f26380b775
switch to using I18n.load_translations instead of requiring plain ruby files
2008-08-13 09:53:25 +02:00
Sven Fuchs
bfa143fd4d
fix require path in vendor.rb for fixed vendor/gem dir structure
2008-08-13 09:44:46 +02: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
Jeremy Kemper
1b127fcdea
Set asset-cached file ctime and mtime to the max mtime of the combined files. Allows for consistent ETag generation without having a shared filesystem.
2008-08-12 20:18:03 -07:00
Jeremy Kemper
45b79d933c
Merge branch 'conditional-get'
2008-08-12 17:03:17 -07:00
Jeremy Kemper
08b0cf07db
Update changelog for conditional GET utility methods
2008-08-12 17:03:06 -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
Sven Fuchs
572f73fae6
update i18n gem and clean up dir structure within i18n-0.0.1
2008-08-10 21:44:35 +02:00
Sven Fuchs
bdf783b5a8
update i18n usage for pluralization hashes (api change)
2008-08-10 21:29:02 +02:00
Matthew Rudy Jacobs
eb4668b26a
rake db:fixtures:load and db:fixtures:identify now accept a FIXTURES_PATH option eg. "rake db:fixtures:load FIXTURES_PATH=spec/fixtures"
...
Signed-off-by: Michael Koziarski <michael@koziarski.com >
[#792 state:committed]
2008-08-09 18:36:40 +02:00
Stefan Kaes
b2630502a0
Fixed autolink regexp compatibility for ruby 1.9 [ #783 state:resolved]
...
Signed-off-by: Joshua Peek <josh@joshpeek.com >
2008-08-09 10:48:56 -05:00
Cameron Yule
2faf35cea9
Added tests for partial collection counters [ #766 state:resolved]
...
Signed-off-by: Joshua Peek <josh@joshpeek.com >
2008-08-09 10:48:56 -05:00
miloops
ea0d036e31
mail_to should use decodeURIcomponent instead of unescape to be utf friendly.
...
Signed-off-by: Michael Koziarski <michael@koziarski.com >
2008-08-08 15:31:02 +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
Jeremy Kemper
ba2d61dd81
Update tests for request memoization
2008-08-08 02:31:12 -07:00
Jeremy Kemper
c24a7cdd23
Don't shadow host method
2008-08-08 02:29:37 -07:00
Daniel Rodríguez Troitiño
06e4eb49ea
Added file name information for errors and exceptions in script/runnner
...
Signed-off-by: Michael Koziarski <michael@koziarski.com >
2008-08-08 10:48:52 +02:00
James Rosen
14cf9a8991
dryed up resources; fixed small formatting issue in resources rdoc
...
Signed-off-by: Michael Koziarski <michael@koziarski.com >
2008-08-08 10:47:26 +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
Jeremy Kemper
b7529ed1cc
Simplifying usage of ETags and Last-Modified and conditional GET requests
2008-08-07 23:43:12 -07:00
Jeremy Kemper
e43d1c226d
Inherit these from AbstractRequest instead
2008-08-07 23:34:36 -07:00
Jeremy Kemper
6c70c02c83
Freeze memoized results when instance is frozen instead of immediately so you can memoize mutable objects
2008-08-07 23:31:43 -07:00
Jeremy Kemper
a8057669ff
Fixed memoize with punctuation and freezing memoized methods with arguments
...
Signed-off-by: Joshua Peek <josh@joshpeek.com >
2008-08-07 14:55:14 -05:00
Clemens Kofler
105093f907
Refactor DateHelper to use DateTimeSelector presenter pattern
...
Signed-off-by: Joshua Peek <josh@joshpeek.com >
2008-08-07 13:13:47 -05:00
Joshua Peek
be0d235a3b
Optimize memoized method if there are no arguments
2008-08-06 20:21:15 -05:00
Joshua Peek
b2504f8ba0
Tidy up ActionMailer rendering logic to take advantage of view path cache instead of using file system lookups
2008-08-06 20:11:21 -05:00
Jeremy Kemper
ed8a882e47
JRuby: improve constantize performance. [ #410 state:resolved]
2008-08-06 17:31:57 -07:00
Joshua Peek
f5bcbde1e3
Make sure ActionView is loaded inorder to build view paths
2008-08-06 17:40:03 -05:00
Joshua Peek
c6b7d0f344
Ensure file atomic write uses the cache directory as its tmp folder
2008-08-06 17:25:32 -05:00
Jeremy Kemper
165120a606
Be more careful about deducing action_methods
2008-08-06 15:23:57 -07:00
Joshua Peek
fbc6129acd
Treat single C operations in MemoryStore as atomic
2008-08-06 17:03:42 -05:00
Joshua Peek
dfc83566b3
Make FileStore use atomic writes
2008-08-06 14:54:18 -05:00
Joshua Peek
e5b1ab7cc3
MemoryStore is the only "unsafe" store. Make it threadsafe by default.
2008-08-06 14:54:18 -05:00
Joshua Peek
73056500f8
Make File.atomic_write copy the original permissions or use the directories default.
2008-08-06 14:54:18 -05: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
Jeremy Kemper
29a06f10e8
Strip newlines from cookie session data
2008-08-05 19:28:52 -07:00
Jeremy Kemper
69e9cbb99a
Ensure public superclass methods don't shadow public controller methods. Case in point, ruby-debug's Kernel#start shadowing a controller's start action.
2008-08-05 17:35:08 -07:00
Jeffrey Hardy
8d72b82b8d
Make assert_template failure message more friendly
...
Signed-off-by: Joshua Peek <josh@joshpeek.com >
2008-08-05 16:29:56 -05:00
Clemens Kofler
dc66469e64
Fixed i18n bulk translate issues in NumberHelper
...
Signed-off-by: Joshua Peek <josh@joshpeek.com >
2008-08-04 22:26:14 -05:00
Joshua Peek
177a35e711
Added config.threadsafe! to toggle allow concurrency settings and disable the dependency loader
2008-08-04 22:19:41 -05:00
Jeremy Kemper
ddd552504b
Expose Routing::Segment::SAFE_PCHAR list of path characters that don't need escaping
2008-08-04 18:37:53 -07:00
Ben Sandofsky
61842d97c5
Make requiring gems optional.
...
Signed-off-by: Michael Koziarski <michael@koziarski.com >
[#743 state:resolved]
2008-08-04 14:53:21 +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
Joshua Peek
cb21db1a33
Treat ActionMailer template_root as a view path set internally to avoid inheritance and dupping issues
2008-07-31 20:11:52 -05:00
Jeremy Kemper
909a7f430b
Ensure mailer view path is loaded when it's assigned. Path#[] raises if it isn't loaded.
2008-07-31 17:51:43 -07:00
Jeremy Kemper
ad4553587e
List available actions in UnknownAction exception message
2008-07-31 17:50:53 -07:00
Jeremy Kemper
46a458206f
Merge branch 'master' of git@github.com:rails/rails
2008-07-31 16:35:58 -07:00
Jeremy Kemper
a540725f0d
load_application_classes requires files relative to the load path and without .rb extension, including .rb files in subdirectories
2008-07-31 16:35:17 -07:00
Tarmo Tänav
0b9bfbdebf
Use "/usr/bin/env ruby" instead of "/usr/local/bin/ruby"
...
Signed-off-by: Joshua Peek <josh@joshpeek.com >
2008-07-31 16:39:48 -05: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
miloops
f3da46effa
In javascript helpers option[:type] = :synchronous should work as described in docs.
...
Signed-off-by: Michael Koziarski <michael@koziarski.com >
2008-07-31 21:28:12 +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
Joshua Peek
030d5854ad
Turn cache_classes on by default [ #645 state:resolved]
2008-07-31 13:42:28 -05: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
Michael Koziarski
f64bd2ca85
Ensure dbconsole includes the -p parameter to mysql as intended
2008-07-31 09:46:40 +02:00
miloops
2617d0dc5c
Performance: grouping helpers should use yield instead of block as argument. [ #723 state:resolved]
2008-07-30 01:52:16 -07:00
José Valim
c4038764d2
Initializer requires ERB explicitly instead of assuming Action Pack loaded it. [ #722 state:resolved]
2008-07-30 01:49:49 -07:00
miloops
eaab895f83
Prototype helpers should generate Element.insert instead of Insertion.new, which has been deprecated in Prototype 1.6.
2008-07-30 01:42:32 -07:00
José Valim
c8e80f6389
Initializer skips prepare_dispatcher if Action Controller isn't in use. [ #721 state:resolved]
2008-07-30 01:41:51 -07:00
Joshua Peek
a065b764e5
Reapply 'cab168ac' because it was accidentally patched over in '10d9fe4b'
2008-07-29 22:04:07 -05:00
Clemens Kofler
fea7771d22
Updated NumberHelper: Full i18n support (except number_to_phone), consolidated API (almost all methods now support :precision, :delimiter and :separator). Added deprecation notices for old API. Added tests for new options [ #716 state:resolved]
...
Signed-off-by: Joshua Peek <josh@joshpeek.com >
2008-07-29 21:47:02 -05:00
Michael Koziarski
d9452d3ab3
Remove incomplete non-blocking logger functionality
2008-07-29 20:01:25 +02:00
Michael Koziarski
a24398b647
Guard the logger's internal buffer to prevent major breakage on genuinely threaded environments
2008-07-29 19:49:38 +02:00
Jan De Poorter
7aaf1689dd
Fix that label_tag doesn't take a symbol for a name. [ #719 state:resolved]
...
Signed-off-by: Pratik Naik <pratiknaik@gmail.com >
2008-07-29 12:39:21 +01:00
Jeremy Kemper
2cf161a384
Once is enough, mmk
2008-07-28 13:54:10 -07:00
Jeremy Kemper
ae6105ef01
Don't rememoize if already frozen
2008-07-28 13:54:10 -07:00
Jeremy Kemper
eb256718c3
Remove send! usage, relic of reverted 1.9 behavior
2008-07-28 13:54:10 -07:00
Jeremy Kemper
50bbc87f85
MacRuby: BasicObject unavailable
2008-07-28 13:54:10 -07:00
Joshua Peek
19db0b7324
Added back ActionController::Base.allow_concurrency flag and moved lock down to controller processing.
2008-07-28 14:31:40 -05:00
Joshua Peek
a5db148825
Prepare Route#generate and Route#recognize early. Also refactor segments a bit to try to make immutable.
2008-07-28 13:41:42 -05:00
Joshua Peek
e0513e33c4
Routing whitespace cleanup
2008-07-28 13:38:20 -05:00
Pratik Naik
6e75455125
Merge docrails changes
2008-07-28 12:33:24 +01:00
Clemens Kofler
10d9fe4bf3
Refactored TextHelper#truncate, highlight, excerpt, word_wrap and auto_link to accept options hash [ #705 state:resolved]
...
Signed-off-by: Joshua Peek <josh@joshpeek.com >
2008-07-27 16:49:19 -05:00
Clemens Kofler
f7abf0c9db
error_message_on takes an options hash instead of ordered parameters [ #704 state:resolved]
...
Signed-off-by: Joshua Peek <josh@joshpeek.com >
2008-07-27 16:34:20 -05: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
Joshua Peek
f48b9ab5c2
ActionController::Base.relative_url_root falls back to ENV['RAILS_RELATIVE_URL_ROOT']
2008-07-24 14:06:22 -05:00
Sam Granieri
11fdcf88c2
Check for ActionMailer and ActionController before attempting to eager load their view paths
...
Signed-off-by: Joshua Peek <josh@joshpeek.com >
2008-07-24 13:51:54 -05:00
Joshua Peek
a87462afcb
AbstractRequest.relative_url_root is no longer automatically configured by a HTTP header. It can now be set in your configuration environment with config.action_controller.relative_url_root
2008-07-24 13:41:51 -05:00
Joshua Peek
3fd9036fc5
Added config.dependency_loading to enable or disable the dependency loader after initialization
2008-07-24 11:58:26 -05:00
Joshua Peek
55adaa2efc
Fixed bc5896e, and added test case for the caching bug it originally introduced.
2008-07-23 13:47:30 -05:00
Joshua Peek
e0db925be0
Revert 'bc5896e'
2008-07-23 11:23:25 -05:00
Joshua Peek
97a954bf1d
Load view path cache after plugins and gems.
2008-07-23 10:41:28 -05:00
Joshua Peek
db1bac796e
Just file?
2008-07-23 10:24:47 -05: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
2681685450
Extract ActiveSupport::TypedArray class to ensure an array is all of the same type [ #673 state:resolved]
2008-07-22 11:12:16 -05:00
Joshua Peek
bc5896e708
Memoize ActionView::Base pick_template and find_partial_path for rendering duration
2008-07-22 10:27:32 -05:00
Joshua Peek
8a87d8a6c2
Improved Memoizable test coverage and added support for multiple arguments
2008-07-22 10:26:44 -05:00
Joshua Peek
8b858782fa
Ensure adapater specific code is loaded on ActiveRecord::Base.establish_connection
2008-07-21 22:41:38 -05:00
Miles Georgi
92f944818e
Make script/plugin work with svn+ssh urls. [ #662 state:resolved]
...
Signed-off-by: Pratik Naik <pratiknaik@gmail.com >
2008-07-22 01:43:23 +01: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
89ec72c281
Added configurable eager load paths. Defaults to app/models, app/controllers, and app/helpers
2008-07-21 13:43:23 -05:00
Joshua Peek
3bd34b6ffe
Preload application classes. Uses same strategy as phusion passenger.
2008-07-21 13:43:23 -05:00
Clemens Kofler
0f43de644e
Refactored NumberHelper API to accept arguments as an options hash [ #666 state:resolved]
...
Signed-off-by: Joshua Peek <josh@joshpeek.com >
2008-07-21 13:05:27 -05:00
Clemens Kofler
ff9f6fcc75
Refactor DateHelper and improve test coverage [ #665 state:resolved]
...
Signed-off-by: Joshua Peek <josh@joshpeek.com >
2008-07-21 12:57:15 -05:00
Michael Koziarski
5bec5848b2
If it doesn't overflow, it won't have a .start method. So don't run the second assertion either
2008-07-20 21:25:31 +02:00
Michael Koziarski
006cbb8fde
Handle the case where 64bit time_t won't overflow.
2008-07-20 21:23:18 +02:00
Joshua Peek
da85251f85
Refactor ActiveSupport::Dependencies injector so it would be possible to disable it
2008-07-19 17:32:22 -05:00
Joshua Peek
598b4546fd
Fixed spelling mistake in deprecation warning [ #381 state:resolved]
2008-07-19 15:43:39 -05:00
Joshua Peek
55bfe6be52
Ensure ActionView::PathSet::Path is not initialized with a precompiled path
2008-07-19 15:27:55 -05:00
Kevin Glowacz
1b4b1aa725
Fixed index and auto index for nested fields_for [ #327 state:resolved]
...
Signed-off-by: Joshua Peek <josh@joshpeek.com >
2008-07-19 15:10:12 -05:00
David Heinemeier Hansson
706425e154
Update Prototype to 1.6.0.2 (Patrick Joyce) [ #599 status:committed]
2008-07-19 13:56:38 -05:00
Clemens Kofler
c98692abcf
Removed handling of string parameter in link_to to have all URL generation done by url_for
...
Signed-off-by: Joshua Peek <josh@joshpeek.com >
2008-07-19 13:06:43 -05:00
Clemens Kofler
938caf4e6b
Removed unused option from FormHelper#fields_for [ #641 state:resolved]
...
Signed-off-by: Joshua Peek <josh@joshpeek.com >
2008-07-19 12:40:30 -05:00
Joshua Peek
e23156e87b
Only create a path for ActionMailer template root instead of a path set. Better fix than 7461227
2008-07-19 12:35:42 -05:00
Joshua Peek
7461227352
Ruby 1.9: Call join on template_root instead of to_s
2008-07-19 12:23:08 -05:00
Joshua Peek
e0d7bace4e
Prefer Mongrel over Thin [ #658 state:resolved]
2008-07-19 11:42:27 -05:00
Joshua Peek
576cae0043
Stub out timestamped_migrations in generator tests
2008-07-19 11:34:32 -05:00
Joshua Peek
3fdd1acab6
Dropped SQLite 2 from default test runner
2008-07-19 11:30:15 -05:00
Joshua Peek
b74b97fef5
Update uses_mocha in ActionMailer and ActiveResource
2008-07-19 11:14:12 -05:00
Joshua Peek
8c2e839e5a
Fix some warnings in i18n lib
2008-07-19 11:04:23 -05:00
Joshua Peek
d84d99a8f7
Undefine old run method
2008-07-19 10:52:30 -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
Joshua Peek
cab168ac9b
Ruby 1.9: Fixed regexp warning by replacing nested repeat operator + and ? with '*'
2008-07-19 00:46:02 -05:00
Joshua Peek
108ed4a566
Ruby 1.9: Strip encoding from ERB source since you can not change character encoding during a method
2008-07-19 00:24:02 -05:00
Joshua Peek
c609be4596
Ruby 1.9: Ensure Memoizable#freeze is only overriden once to avoid an endless loop
2008-07-18 23:30:36 -05:00
Tom Ward
d39485078e
Raise ArgumentError if an invalid method is specified as part of a route's conditions. Also raise an error if HEAD is specified as the method, as rails routes all HEAD requests through the equivalent GET, though doesn't return the response body [ #182 state:resolved]
...
Signed-off-by: Joshua Peek <josh@joshpeek.com >
2008-07-18 20:19:03 -05:00
Tom Ward
c3d1fda555
Set the response content type to that of found template if not explicitly set elsewhere [ #444 state:resolved]
...
Signed-off-by: Joshua Peek <josh@joshpeek.com >
2008-07-18 20:14:12 -05:00
Joshua Peek
d2ccb852d4
Removed lagacy TemplateHandler#render API. Left in a legacy TemplateHandler and Compilable stub so plugins will not have to change anything.
2008-07-18 16:00:20 -05:00
Joshua Peek
ef6f6625c9
Changed ActiveSupport::Memoizable API to extend since it mainly adds the memoize class method
2008-07-18 15:32:28 -05:00
Joshua Peek
e1f23da53c
Allow memoized methods to be reloaded and allow multiple symbols
2008-07-18 11:19:38 -05:00
Jeremy Kemper
7430c4168f
Decrease default benchmark runs from 10 to 4
2008-07-17 23:18:21 -07:00
Jeremy Kemper
57a2780f14
etag! and last_modified! conditional GET helpers
2008-07-17 23:18:10 -07: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
8f9702db5c
Merge branch 'master' of git@github.com:rails/rails
2008-07-17 14:43:08 -07:00
Joshua Peek
7359597004
Wrap AssetTagHelper's computed public path cache in a threadsafe store
2008-07-17 16:03:48 -05:00
Joshua Peek
0eef4e554d
Allow ActiveSupport::Cache logger to be silenced
2008-07-17 16:00:59 -05:00
Joshua Peek
94cf6675d5
Cleanup ActiveSupport::Cache::ThreadSafety module and add test coverage
2008-07-17 15:29:30 -05: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
Pratik Naik
99930d499e
Fix symbol cookie test
2008-07-17 18:19:09 +01:00
MatthewRudy
7e8aee7e6c
Add extra tests to ensure Hash#slice works with an array as a key. #613
...
Signed-off-by: Pratik Naik <pratiknaik@gmail.com >
2008-07-17 15:34:51 +01:00
Pratik Naik
b3a2ee7b87
Revert "Hash#slice supports an array of keys [ #613 state:resolved]"
...
This reverts commit 396f9df891 .
2008-07-17 15:28:02 +01: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
Joshua Peek
d8a72b32c5
Revert "Run callbacks from object's metaclass"
2008-07-16 20:23:44 -05:00
Lawrence Pit
40dbebba28
Allow deep merging of hash values for nested with_options. [ #490 state:resolved]
...
Signed-off-by: Pratik Naik <pratiknaik@gmail.com >
2008-07-17 01:59:08 +01:00
Joshua Peek
cd63015570
All 2xx requests are considered successful [ #217 state:resolved]
2008-07-16 19:49:46 -05:00
Ripta Pasay
f7fdbae770
Use fully-qualified controller name when logging. [ #600 state:resolved]
...
Signed-off-by: Pratik Naik <pratiknaik@gmail.com >
2008-07-17 01:33:44 +01:00
Josh Owens
396f9df891
Hash#slice supports an array of keys [ #613 state:resolved]
...
Signed-off-by: Joshua Peek <josh@joshpeek.com >
2008-07-16 19:31:37 -05:00
Joshua Peek
7ae2105d57
MemCacheStore#decrement should use data instance variable not local variable [ #521 state:resolved]
2008-07-16 18:46:04 -05:00
David Heinemeier Hansson
73ade4fe10
Resolved conflict
2008-07-16 17:45:28 -05:00
David Heinemeier Hansson
8fe01de2e8
Fixed that AssetTagHelper#compute_public_path shouldn't cache the asset_host along with the source or per-request proc's won't run [DHH]
2008-07-16 17:39:14 -05:00
rick
0a6d75dedd
merge with local tweaks
2008-07-16 14:20:15 -07:00
Sven Fuchs
842917dea0
moving country helpers from form_options_helper to form_country_helper again
2008-07-16 11:30:57 -07:00
Sven Fuchs
428b77debd
fixing another timezone dependent test
2008-07-16 11:07:08 -07:00
Pratik Naik
90c930f45c
Allow Dispatcher exceptions to be handled in application.rb using rescue_from
2008-07-16 18:54:08 +01:00
Sven Fuchs
0ac342fbe5
make i18n date/time tests timezone independent
2008-07-16 10:51:48 -07:00
Stefan Kaes
c64d749abd
Fixed template recompile logic [ #630 state:resolved]
...
Signed-off-by: Joshua Peek <josh@joshpeek.com >
2008-07-16 08:26:23 -05:00
Pratik Naik
0432d15164
Merge with docrails.
2008-07-16 13:01:23 +01:00
Joshua Peek
f7d08acd5e
Add some useful comments to rackup config
2008-07-15 23:32:31 -05:00
Pratik Naik
8b933517ea
Add config.ru to rails app generator
2008-07-16 05:20:29 +01:00
Pratik Naik
2a7aca8ec3
Improve rack/cgi tests
2008-07-16 05:07:34 +01:00
Pratik Naik
1d002f6bcb
Make RackRequest#request_method respect _method
2008-07-16 05:02:29 +01:00
Joshua Peek
fea5b6fd41
ActionMailer and ActionView can share the same view path cache
2008-07-15 22:58:42 -05:00
Joshua Peek
83e29b9773
Removed config.action_view.cache_template_loading, use config.cache_classes instead
2008-07-15 22:58:42 -05:00
Pratik Naik
5cc3ea6969
RackResponse should not contain Status header
2008-07-16 04:17:28 +01:00
Pratik Naik
3343eb428c
Tests for rack response content type
2008-07-16 04:09:41 +01:00
Joshua Peek
be078ee162
Run callbacks from object's metaclass [ #575 state:resolved]
2008-07-15 22:01:02 -05:00
Joshua Peek
f4f6e57e8c
Added Object#metaclass
2008-07-15 22:01:02 -05:00
Sven Fuchs
2e74ddbd73
missed to remove a call to to_s while resolving conflicts in validations.rb
2008-07-16 04:35:00 +02:00
Pratik Naik
89eec91e67
Add tests for CgiRequest#content_type
2008-07-16 03:31:45 +01:00
Pratik Naik
0f8206104e
RackRequest#content_type should return Mime::Type
2008-07-16 03:18:35 +01:00
Sven Fuchs
fbe1823117
add i18n lib files
2008-07-16 04:16:08 +02:00
Sven Fuchs
731fca8cf6
remove i18n lib subproject
2008-07-16 04:15:31 +02:00
Joshua Peek
8b306bf24c
Improved test coverage for fragment cache helper
2008-07-15 20:54:17 -05:00
Jeremy Kemper
ecc0543525
JavaScriptGenerator should only sets output_buffer for the duration of the update block
2008-07-15 18:42:22 -07:00
Sven Fuchs
931f366ffc
merge forward to current rails/master
2008-07-16 03:41:11 +02:00
Sven Fuchs
8691e25540
reverting changes to form_options_helper for merge
2008-07-16 03:28:44 +02:00
Stefan Kaes
fbef982e4b
Observers not longer add an after_find method to the observed class.
...
[#625 state:resolved]
2008-07-15 16:48:16 -07:00
David Lowenfels
c7acfbb25d
requiring rubygems version 1.1.1
2008-07-15 16:28:41 -07:00
miloops
459e5817a5
update_counters should update nil values.
...
This allows counter columns with default null instead of requiring default 0.
[#493 state:resolved]
2008-07-15 16:21:11 -07:00
Jeremy Kemper
1edb5c85b5
Give more info on missing gems and abort instead of printing a warning. App can begin in incomplete state otherwise.
2008-07-15 15:50:37 -07:00
Pratik Naik
b337ab0221
Move performance test helper settings to railties
2008-07-15 21:07:25 +01:00
Joshua Peek
aca246ab25
Get buffer for fragment cache from template's @output_buffer
2008-07-15 14:43:52 -05:00
Jonathan Viney
4f72feb84c
Move the transaction counter to the connection object rather than maintaining it on the current Thread.
...
Signed-off-by: Michael Koziarski <michael@koziarski.com >
[#533 state:resolved]
2008-07-15 21:25:12 +02:00
Michael Koziarski
24a8ae4e08
Try to get more useful errors out of the test_line_offset failures
2008-07-15 20:39:36 +02:00
Jeremy Kemper
3c282f3a0a
Ruby 1.9 compat: only eval with block.binding in 1.9, uses more memory than eval with block
2008-07-15 10:42:50 -07:00
Jeremy Kemper
4d76bad387
Ruby 1.9 compat: account for different String#hash
2008-07-15 10:40:33 -07:00
松田 明
bb33432b0f
Ruby 1.9 compat: call Proc#binding explicitly. [ #623 state:resolved]
2008-07-15 10:39:02 -07:00
Adrian Mugnolo
fc89a95193
Add in_groups to ActiveSupport::CoreExtensions::Array::Grouping. [ #579 state:resolved]
...
Signed-off-by: Pratik Naik <pratiknaik@gmail.com >
2008-07-15 15:04:26 +01:00
Tarmo Tänav
c1531ae00d
SQLite: rename_column raises if the column doesn't exist.
...
[#622 state:resolved]
2008-07-14 22:58:22 -07:00
Tarmo Tänav
8c91b767c0
Fixed postgresql limited eager loading for the case where scoped :order was present
2008-07-14 22:44:58 -07:00
gbuesing
3451045658
Fix TimeWithZone unmarshaling: coerce unmarshaled Time instances to utc, because Ruby's marshaling of Time instances doesn't respect the zone
2008-07-14 23:16:39 -05:00
Joshua Peek
7f0346237e
Append a "_" to memoized instance variables
2008-07-14 20:25:09 -05:00
Tarmo Tänav
911c2c3813
Some performance tweaks to ActiveSupport::Memoizable
...
Signed-off-by: Joshua Peek <josh@joshpeek.com >
2008-07-14 20:23:23 -05:00
Joshua Peek
001c8beb4d
memorize typo
2008-07-14 20:02:59 -05:00
Joshua Peek
dd41f66af5
Include Memoizable in ActionView::Template
2008-07-14 19:51:43 -05:00
Joshua Peek
8a9934a9d9
Added Memoizable mixin for caching simple lazy loaded attributes
2008-07-14 19:50:32 -05:00
Tarmo Tänav
d27dd860c7
Use sub instead of gsub
...
Signed-off-by: Joshua Peek <josh@joshpeek.com >
2008-07-14 18:02:59 -05:00
Joshua Peek
9dc258d614
Eager load Partial variable_name and counter_name. Tidy up render_partial_collection.
2008-07-14 17:40:58 -05:00
Tiago Macedo
76df9fa068
Fix integer quoting issues in association preload. [ #602 state:resolved]
...
Signed-off-by: Pratik Naik <pratiknaik@gmail.com >
2008-07-14 23:34:19 +01:00
Gabe da Silveira
cd9b24286a
Add assert_sql helper method to check for specific SQL output in Active Record test suite. [ #325 state:resolved]
...
Signed-off-by: Pratik Naik <pratiknaik@gmail.com >
2008-07-14 23:22:39 +01:00
Jeremy Kemper
2d6562d51b
Move dead recompile_template? also
2008-07-14 13:51:59 -07:00
Jeremy Kemper
3fbefecc9c
Remove dead code from merge
2008-07-14 13:47:51 -07:00
Tarmo Tänav
07578ac855
Fixed mysql change_column_default to not make the column always nullable.
...
Also added change_column_null to both mysql and sqlite to keep the api features closer to postgresql.
[#617 state:resolved]
2008-07-14 12:42:01 -07:00
Tarmo Tänav
8f72bc92e2
Fixed test_rename_nonexistent_column for PostgreSQL
...
Also fixed ability to run migration_test.rb alone
[#616 state:resolved]
2008-07-14 12:22:27 -07:00
Jeremy Kemper
c760dbfd31
PostgreSQL: don't dump :limit => 4 for integers
2008-07-14 11:59:46 -07:00
Jeremy Kemper
4e323f6ef0
Fix bad merge
2008-07-14 11:50:07 -07:00
Jeremy Kemper
cdf0f1aa2e
Faster and clearer value_to_boolean
2008-07-14 11:41:56 -07:00
Jeremy Kemper
269c6c6bcf
Cache Module#parent_name
2008-07-14 10:46:16 -07:00
Jeremy Kemper
ae9356ae9e
Cache template loading for performance tests
2008-07-14 10:46:16 -07:00
Jeremy Kemper
425de8db6a
Use instance_method(...) to check whether the method exists
2008-07-14 10:46:15 -07:00
Jeremy Kemper
2167f95d85
Restore the more readable before_ and after_filters methods since they aren't called frequently
2008-07-14 10:11:53 -07:00
David Heinemeier Hansson
3037022789
Fixed that create database statements would always include "DEFAULT NULL" (Nick Sieger) [ #334 status:committed]
2008-07-14 10:12:54 -05:00
Sebastian A. Espindola
0176e6adb3
Added db:charset support to PostgreSQL. [ #556 state:resolved]
...
Signed-off-by: Pratik Naik <pratiknaik@gmail.com >
2008-07-14 04:11:52 +01:00
Tim Pope
5c08607082
Make script/plugin install <plugin> -r <revision> option work with git based plugins. [ #257 state:resolved]
...
Signed-off-by: Pratik Naik <pratiknaik@gmail.com >
2008-07-14 03:47:22 +01:00
David Dollar
e0750d6a5c
Add :accessible option to Associations for allowing mass assignments using hash. [ #474 state:resolved]
...
Allows nested Hashes (i.e. from nested forms) to hydrate the appropriate
ActiveRecord models.
class Post < ActiveRecord::Base
belongs_to :author, :accessible => true
has_many :comments, :accessible => true
end
post = Post.create({
:title => 'Accessible Attributes',
:author => { :name => 'David Dollar' },
:comments => [
{ :body => 'First Post!' },
{ :body => 'Nested Hashes are great!' }
]
})
post.comments << { :body => 'Another Comment' }
Signed-off-by: Pratik Naik <pratiknaik@gmail.com >
2008-07-14 02:53:21 +01:00
Jason Dew
c6f397c5ce
Add block syntax to HasManyAssociation#build. [ #502 state:resolve]
...
Signed-off-by: Pratik Naik <pratiknaik@gmail.com >
2008-07-14 02:24:12 +01:00
Rhett Sutphin
d72c66532f
Make fixture accessors work when fixture name is not same as the table name. [ #124 state:resolved]
...
Signed-off-by: Pratik Naik <pratiknaik@gmail.com >
2008-07-14 02:01:52 +01:00
Jacek Becela
697ee1a50d
Enable loading fixtures from arbitrary locations. [ #586 state:resolved]
...
Signed-off-by: Pratik Naik <pratiknaik@gmail.com >
2008-07-14 01:32:01 +01:00
Pratik Naik
9783e66cad
Slightly faster DateTime#to_json. [ #598 state:resolved] [Alex Zepeda]
2008-07-14 01:02:07 +01:00
rsl
95812d5eaf
Ensure :index works with fields_for select methods. [ #518 state:resolved]
...
Signed-off-by: Pratik Naik <pratiknaik@gmail.com >
2008-07-14 00:55:57 +01:00
Tapajós
0d241f4434
Use full path in database tasks so commands will work outside of Rails root [ #612 state:resolved]
...
Signed-off-by: Joshua Peek <josh@joshpeek.com >
2008-07-13 14:19:03 -05:00
Joshua Peek
68fe898189
Check first render format and extension. Fixes failing ActionMailer test.
2008-07-13 14:05:21 -05:00
Joshua Peek
26bc867151
Small tweak to e0fef66
2008-07-13 14:00:40 -05:00
Joshua Peek
e0fef66149
Made ActionView::Base#first_render a little more private. And added _last_render to track the most recent render. Will fix #609 as a side effect. [ #609 state:resolved]
2008-07-13 13:26:48 -05:00
Joshua Peek
99cc85bc09
Set config.action_view.warn_cache_misses = true to receive a warning if you perform an action that results in an expensive disk operation that could be cached
2008-07-12 15:31:50 -05:00
Joshua Peek
73b34e9f75
Refactor template preloading. New abstractions include Renderable mixins and a refactored Template class.
2008-07-12 14:33:46 -05:00
Joshua Peek
30204c4e66
Set global ActionController::Base.view_paths for test cases
2008-07-12 14:11:51 -05:00
Joshua Peek
65fb2e76f2
Removed a few implementation specific view path tests
2008-07-12 12:17:10 -05:00
Joshua Peek
b603de0882
Improve test coverage and create fixtures for RenderPartialWithRecordIdentificationTests
2008-07-12 12:17:10 -05:00
Daniel Guettler
f90eb81c65
Ensure script/generate finds generators from symlinked plugins. [ #449 state:resolved]
...
Signed-off-by: Pratik Naik <pratiknaik@gmail.com >
2008-07-12 17:51:48 +01:00
Michael Koziarski
e53f5fe696
Restore support for partial matches in assert_redirected_to
...
If both the actual redirection and the asserted redirection are hashes, succeed if the asserted redirection is a strict subset of the actual redirection.
2008-07-12 11:42:41 +02:00
Johan Sørensen
50b5c6845e
Ensure mail_to label is obfuscated for javascript encoding. [ #294 state:resolved]
...
Signed-off-by: Pratik Naik <pratiknaik@gmail.com >
2008-07-12 01:04:18 +01:00
Micah Wedemeyer
5e2e1ed9ff
Ensure MysqlAdapter allows SSL connection when only sslca is supplied. [ #253 state:resolved]
...
Signed-off-by: Pratik Naik <pratiknaik@gmail.com >
2008-07-11 23:52:41 +01:00
Joshua Peek
6ebdd0e32b
Changed ActionView::TemplateHandler#render API method signature to render(template, local_assigns = {})
2008-07-11 15:40:41 -05:00
Michael Koziarski
292501c7e0
Use require_dependency 'application' not require in the console bootstraps to avoid requiring application.rb twice
2008-07-11 22:27:36 +02:00
Michael Koziarski
6b9f8adb3e
Whitespace
2008-07-11 19:23:21 +02:00
Joshua Peek
c00baf496e
Added tests to show that 2d372d7 breaks old generator behavior ( #545 state:resolved)
2008-07-11 12:09:25 -05:00
Joshua Peek
f522a89d64
Revert "Fixed generator collisions for nested controller modules."
...
This reverts commit 2d372d7049 .
2008-07-11 12:05:02 -05:00
Joshua Peek
04a87af5b7
Ensure use_accept_header is enabled for test_action_cache_conditional_options
2008-07-11 11:51:35 -05:00
Joshua Peek
d106f2d08a
Ensure use_accept_header is enabled for test_action_cache_conditional_options
2008-07-11 11:49:22 -05:00
Joshua Peek
15b2175426
Fixed teardown method typo (plus whitespace)
2008-07-11 11:44:24 -05:00
Joshua Peek
68289693f7
Check for response in builder template since ActionMailer does not have one
2008-07-11 11:14:59 -05:00
Joshua Peek
7d5c447d9c
Stubba is included in Mocha already
2008-07-11 11:12:53 -05:00
Clemens Kofler
feb08984ea
Added notes to Routing documentation and routes.rb regarding defaults routes opening the whole application for GET requests
...
Signed-off-by: Michael Koziarski <michael@koziarski.com >
2008-07-10 09:29:27 +02:00
Jeremy Kemper
d37e641336
Move accept header parsing shortcut to Mime::Type.parse
2008-07-09 11:30:18 -07:00
Jeremy Kemper
0ce7fe5308
Don't repeatedly convert only/except options
2008-07-09 10:42:30 -07:00
Cheah Chu Yeow
ce4a1bb853
Remove some Symbol#to_proc usage in runtime code. [ #484 state:resolved]
2008-07-09 10:42:30 -07:00
Jeremy Kemper
11252e35b1
Boolean type casting creates fewer objects
2008-07-09 10:42:30 -07:00
Jeremy Kemper
f82bd31cb0
Request#accepts special-cases a single mime type
2008-07-09 10:42:30 -07:00
Jeremy Kemper
a6d0ae28e3
Fix teardown method name typo
2008-07-09 10:42:30 -07:00
Jeremy Kemper
ee6bbcb6ae
Put a newline rather than a semicolon at the end of RJS source to avoid parse errors with embedded heredocs
2008-07-09 10:42:29 -07:00
Jeremy Kemper
7dc10478e5
Use ActionController::Base.logger to report template compilation errors since there is no AV::Base.logger
2008-07-09 10:42:29 -07:00
Jeremy Kemper
4354aa36fb
Rendering default template for missing actions works with non-word characters in action name
2008-07-09 10:42:29 -07:00
Jeremy Kemper
350faf14e8
Pass caller to concat deprecation warning
2008-07-09 10:42:29 -07:00
Michael Koziarski
4ce9931f4f
Reenable the use of the Accept header to give people a chance to update their applications and provide feedback.
2008-07-09 18:36:15 +02:00
David Heinemeier Hansson
6b61e95dc8
Changed PrototypeHelper#submit_to_remote to PrototypeHelper#button_to_remote to stay consistent with link_to_remote (submit_to_remote still works as an alias) (clemens) [ #8994 status:closed]
2008-07-09 09:13:24 -05:00
Daniel Guettler
84af99e78d
Ensure NamedScope#build/create/create!/new works as expected when named scope has hash conditions. [Daniel Guettler, Pratik Naik] [ #419 state:resolved]
...
Signed-off-by: Pratik Naik <pratiknaik@gmail.com >
2008-07-09 14:09:17 +01:00
Chris Cherry
124d1016fa
Allow Infinity (1.0/0.0) to pass validates_numericality_of. [ #354 state:resolved]
...
Signed-off-by: Pratik Naik <pratiknaik@gmail.com >
2008-07-09 13:15:07 +01:00
Cheah Chu Yeow
96708af6a5
Ensure url_for(nil) falls back to url_for({}). [ #472 state:resolved]
...
Signed-off-by: Pratik Naik <pratiknaik@gmail.com >
2008-07-09 13:02:14 +01:00
Hongli Lai (Phusion
2b4eb586ef
Plugin locator: sort directory listing because we can't assume that the OS will do it for us. This fixes some unit test failures.
2008-07-09 13:34:36 +02:00
Luca Guidi
dc77359c16
Removed unnecessary or condition in #error_messages_for
2008-07-08 17:41:18 +02:00
Damian Janowski
91320f2a80
Add :recursive option to javascript_include_tag and stylesheet_link_tag to be used along with :all. [ #480 state:resolved]
...
Signed-off-by: Pratik Naik <pratiknaik@gmail.com >
2008-07-08 13:50:59 +01:00
Luca Guidi
cf5d6ab9a8
Added localize helper method
2008-07-08 12:37:49 +02:00
Luca Guidi
2949918b4c
Make sure object name is translated in #error_messages_for
2008-07-08 11:53:19 +02:00
rick
a14cedc779
Merge branch 'master' of git@github.com:rails/rails
2008-07-07 22:24:18 -07:00
Luca Guidi
826c3db421
Updated ActiveRecord::Errors#default_error_messages deprecation warning according to i18n changes
2008-07-07 22:46:16 +02:00
Michael Koziarski
2f4aaed7b3
Disable the Accept header by default
...
The accept header is poorly implemented by browsers and causes strange errors when used on public sites where crawlers make requests too. You should use formatted urls (e.g. /people/1.xml) to support API clients. Alternatively to re-enable it you need to set:
config.action_controller.use_accept_header = true
A special case remains for ajax requests which will have a javascript format for the base resource (/people/1) if the X-Requested-With header is present. This lets ajax pages still use format.js despite there being no params[:format]
2008-07-07 07:31:49 +02:00
rick
e939f60b6c
Merge branch 'assert_redirected_to_fix'
2008-07-06 13:58:07 -07:00
rick
74596233f1
fix ordering of assert_equal in assert_redirected_to. boy, that sure would be easier with rspec or bacon :)
2008-07-06 13:53:15 -07:00
Sven Fuchs
84816ae981
align with changes in i18n
2008-07-06 21:20:02 +02:00
Brad Greenlee
afa0c7f728
Add support for :primary_key option to has_one as well as has_many so that a key other than the default primary key can be used for the association
...
Signed-off-by: Michael Koziarski <michael@koziarski.com >
2008-07-06 20:25:10 +02:00
Andre Arko
3351d29970
Add has_many :primary_key option to allow setting the primary key on a has many association
...
Signed-off-by: Michael Koziarski <michael@koziarski.com >
2008-07-06 20:25:10 +02:00
Sven Fuchs
c9ed2c9bd2
add a translation helper
2008-07-06 19:00:55 +02:00
Joshua Peek
1d8623b42f
Added local assign keys to compiled method name so two threads evaluating the same template with different locals don't step on top of each other
2008-07-06 01:13:15 -05:00
Joshua Peek
7b9e8ae273
Synchronize template compiling
2008-07-06 00:00:45 -05:00
Joshua Peek
9828aecd2a
Lookup compiled methods in CompiledTemplates instance methods set instead of using a "methods_names" hash
2008-07-05 23:54:11 -05:00
Joshua Peek
ce5d958f8f
Do not stat template files in production mode before rendering. You will no longer be able to modify templates in production mode without restarting the server
2008-07-05 18:35:52 -05:00
Joshua Peek
f22ae15a8e
Use the inline template's hash as a method key instead of relying on a counter
2008-07-05 17:49:49 -05:00
Joshua Peek
5a3bc6f12f
Removed unused template_args variable
2008-07-05 17:40:39 -05:00
Joshua Peek
27f382641c
Deprecated TemplateHandler line offset
2008-07-05 17:31:57 -05:00
Joshua Peek
cd6fe83152
Ensure all complied method names are cleaned up in the error backtrace
2008-07-05 16:34:51 -05:00
Joshua Peek
39ba2da82b
Moved complied method name logic into Renderable
2008-07-05 16:27:43 -05:00
Joshua Peek
1dcc59121b
Renamed Renderer to Renderable
2008-07-05 12:05:50 -05:00
Sven Fuchs
a865d19516
reverting changes to ActionMailer
2008-07-04 22:45:53 +02:00
Sven Fuchs
34bd1e95c7
Reverting changes to ActionMailer
...
Revert "Experimental I18n charset support for ActionMailer"
This reverts commit 6982acb079 .
Conflicts:
actionmailer/lib/action_mailer/base.rb
2008-07-04 22:34:32 +02:00
Sven Fuchs
8305d6759a
Reverting changes to ActionMailer
...
Revert "Make sure ActionMailer use default charset if no defined by current locale"
This reverts commit d41e4c1c3d .
2008-07-04 22:26:53 +02:00
Sven Fuchs
35bad50816
Merge branch 'i18n' of git@github.com:svenfuchs/rails into i18n
2008-07-04 22:23:43 +02:00
Sven Fuchs
e1a7f83fca
use :default for human_attribute_name
2008-07-04 22:22:20 +02:00
Jeremy Kemper
271f5b655f
Fix rdoc for Filters::ClassMethods
2008-07-04 12:51:16 -07:00
Pratik Naik
cb645c8877
Use ActiveSupport::TimeZone in time:zones rake tasks
2008-07-04 20:07:00 +01:00
Michael Koziarski
c3aaba0180
Simplify the implementation of assert_redirected_to to normalise the urls before comparing. Also allows for a simpler implementation of redirect_to without most of the recursion.
...
Also allows for assert_redirected_to @some_record
2008-07-04 10:41:40 +03:00
Michael Koziarski
db58391079
Remove old broken follow_redirect from functional tests. Still works in integration tests.
...
The follow_redirect in functional tests only worked if you used redirect_to :id=>foo, :action=>bar, rather than named routes.
2008-07-04 10:41:40 +03:00
Michael Koziarski
51e13d51ad
Move test related core_ext stuff out of regular core ext to prevent nasty surprises when you require active_support then use Test::Unit directly.
2008-07-04 10:41:39 +03:00
Joshua Peek
01637796d7
Revert "Moved TemplateHandlers to Base"
...
This reverts commit 42d215a925 .
Conflicts:
actionpack/lib/action_view/inline_template.rb
actionpack/lib/action_view/template.rb
2008-07-03 21:09:37 -05:00
josevalim
bad1eac91d
Allow caches_action to accept cache store options. [ #416 state:resolved]
...
Signed-off-by: Pratik Naik <pratiknaik@gmail.com >
2008-07-04 02:00:51 +01:00
David Lowenfels
87fbcaa622
Add :tokenizer option to validates_length_of. [ #507 state:resolved]
...
Signed-off-by: Pratik Naik <pratiknaik@gmail.com >
2008-07-04 01:31:39 +01:00
miloops
570f5aad66
Allow date helpers to ignore date hidden field tags. [ #503 state:resolved]
...
Signed-off-by: Pratik Naik <pratiknaik@gmail.com >
2008-07-04 01:06:22 +01:00
Joshua Peek
1a478923dc
Reduce the number of callsites for new TemplateFiles
2008-07-03 14:01:45 -05:00
Joshua Peek
8a442e0d57
Extracted Template rendering logic into Renderer module
2008-07-03 13:06:00 -05:00
Joshua Peek
7d5c8505f5
Use render on InlineTemplate
2008-07-03 12:50:43 -05:00
Joshua Peek
b6f89a8bf5
Don't rely on view instance logger
2008-07-03 12:49:54 -05:00
Joshua Peek
42d215a925
Moved TemplateHandlers to Base
2008-07-03 12:48:00 -05:00
Michael Koziarski
75e04b5295
Tighten the rescue clause when dealing with invalid instance variable names in form_helper.
2008-07-03 19:43:20 +03:00
Michael Koziarski
d79cde37ea
Move the file exists checks outside write_asset_file_contents.
...
This lets us avoid the relatively costly trip through compute_*_paths if the file already exists.
2008-07-03 19:43:14 +03:00
Michael Koziarski
12cf8f348b
Move template_format logic out to the request so it's alongside the 'regular' request format.
...
Use xhr? instead of the expensive trip through Request#accepts.
2008-07-03 19:43:06 +03:00
Michael Koziarski
dc2d754d60
Support for custom annotations with rake notes:custom and DRY up the task definition.
...
e.g. rake notes:custom ANNOTATION=WTF
2008-07-03 19:42:58 +03:00
Michael Koziarski
7098143f07
Remove unused local_binding option to InstanceTag's Constructor
2008-07-03 19:26:56 +03:00
Michael Koziarski
5dd10d60bb
Remove nested ternary operators from select_year in favour of conditionals.
2008-07-03 19:26:56 +03:00
Michael Koziarski
df36a6f759
Remove unneeded ObjectWrapper class.
...
Was previously needed to work around the semantics of a deprecated (now removed) API to render :partial
2008-07-03 19:26:56 +03:00
Michael Koziarski
efd18066a2
Tighten the rescue clause here to prevent hiding strange mock related errors behind the line offset test
2008-07-03 19:21:04 +03:00
Michael Koziarski
e358b1fce8
Remove old method of including javascripts define_javascript_functions.
...
javascript_include_tag and friends do a much better job.
2008-07-03 19:21:04 +03:00
Michael Koziarski
5501166dec
Remove strange alias for JavaScriptHelper
2008-07-03 19:20:47 +03:00
Tarmo Tänav
a37d065f85
Use :namespace instead of :path_prefix for finding controller. [ #544 state:resolved]
...
:namespace is supposed to be the module where controller exists.
:path_prefix can contain anything, including variables, which
makes it unsuitable for determining the module for a controller.
Signed-off-by: Pratik Naik <pratiknaik@gmail.com >
2008-07-03 16:11:50 +01:00
Luca Guidi
d41e4c1c3d
Make sure ActionMailer use default charset if no defined by current locale
2008-07-03 11:50:18 +02:00
Lucas Carlson
d20e8dd220
Changing order of equality because comparing certain objects with false raises an error.
...
>> require 'md5'
=> true
>> MD5.new("Asds") == false
TypeError: can't convert false into String
from (irb):2:in `=='
from (irb):2
>> false == MD5.new("Asds")
=> false
2008-07-02 21:24:48 -07:00
Joshua Peek
3b3790a435
Deprecate :use_full_path render option. The supplying the option no longer has an effect.
2008-07-02 21:38:58 -05:00
Joshua Peek
6c0edef26e
Added Rails.initialized? flag
2008-07-02 21:29:57 -05:00
Mike Subelsky
8f640c381d
Added application/jsonrequest as a synonym for application/json
...
[#536 state:resolved]
2008-07-02 11:39:42 -07:00
rick
a4138d4632
use mocha for TimeZone mocking in Form Options helper tests
2008-07-02 11:09:10 -07:00
Sven Fuchs
8f74ba96c4
remove core extensions in favor of I18n#translate and I18n#localize
2008-07-02 19:21:07 +02:00
Ricardo Santos
820992c98f
Ensure script/plugin unsource 'Usage' text is correct. [ #526 state:resolved]
...
Signed-off-by: Pratik Naik <pratiknaik@gmail.com >
2008-07-02 17:47:19 +01:00
Pratik Naik
267d3964eb
Make sure render :collection doesnt set nil local when :as is absent
2008-07-02 17:19:41 +01:00
Luca Guidi
7403c825a0
Fixed Date and Time localization for ActiveSupport
2008-07-02 17:51:34 +02:00
Pratik Naik
2b43620e3c
Add :as option to render a collection of partials with a custom local variable name. [ #509 state:resolved] [Simon Jefford, Pratik Naik]
2008-07-02 16:40:42 +01:00
Pratik Naik
4f75840d72
Add Inflection rules for String#humanize. [ #535 state:resolved] [dcmanges]
...
Signed-off-by: Pratik Naik <pratiknaik@gmail.com >
2008-07-02 13:25:36 +01:00
Tim Pope
3a95ee73cf
Make rake test:uncommitted work with Git.
...
Note : rake test:uncommitted is considering only unstaged files.
Signed-off-by: Pratik Naik <pratiknaik@gmail.com >
2008-07-02 05:21:59 +01:00
Tim Haines
f5052dd8a3
Make sure render :template works with :locals. [ #524 state:resolved]
...
Signed-off-by: Pratik Naik <pratiknaik@gmail.com >
2008-07-02 04:30:34 +01:00
Joshua Peek
aff2d33172
Improved test coverage and added RackRequest support for CGI environment variables.
2008-07-01 21:53:55 -05:00
Carl Porth
a81f16af31
Ensure Rails::Generator quotes file names while generating diff. [ #264 state:resolved]
...
Signed-off-by: Pratik Naik <pratiknaik@gmail.com >
2008-07-02 03:28:02 +01:00
Pratik Naik
474d425382
Ensure AssociationCollection#size considers all unsaved record. [ #305 state:resolved] [sds]
...
Signed-off-by: Pratik Naik <pratiknaik@gmail.com >
2008-07-02 03:17:33 +01:00
Scott Stewart
7378e23734
Ensure proper output when submit_tag is used with :disabled_with. [ #388 state:resolved]
...
Signed-off-by: Pratik Naik <pratiknaik@gmail.com >
2008-07-02 01:39:30 +01:00
Luca Guidi
6982acb079
Experimental I18n charset support for ActionMailer
2008-07-01 16:52:48 +02:00
gbuesing
6f1d827096
TimeWithZone#advance: treat :weeks option as variable-length
2008-06-29 15:28:34 -05:00
gbuesing
676d6a6514
TimeWithZone: when crossing DST boundary, treat Durations of days, months or years as variable-length, and all other values as absolute length. A time + 24.hours will advance exactly 24 hours, but a time + 1.day will advance 23-25 hours, depending on the day. Ensure consistent behavior across all advancing methods.
2008-06-29 15:21:40 -05:00
rick
01db5ded54
Merge branch 'state_machine'
...
Some big changes:
* Added some redundant requires so active_support/inflecto can be loaded
without the rest of ActiveSupport.
* Disabled callbacks and validations until they are added and tested.
* Converted specs back to tests, using ActiveSupport::TestCase and the new
#test helper.
* As an experiment, I imported Scott Barron's awesome AASM gem into
ActiveModel. I added multiple state machine support and vastly improved
the API (no more aasm_* prefixes). All the old tests pass. If this bothers
people, I have no problems removing this and contributing the changes back to
AASM. I just feel like AMo is a better spot for all these 'modelish' features.
2008-06-29 12:13:58 -07:00
gbuesing
4cf93935b2
Fix indentation and update changelogs for previous commit
2008-06-29 13:46:07 -05:00
Ernie Miller
d0092dc44d
Added support for regexp matching of priority zones in time_zone_select [ #195 state:resolved]
2008-06-29 13:37:07 -05:00
Pratik Naik
029a745584
Ensure FormBuilder date helpers respects html_options. [ #506 state:resolved] [Pascal Ehlert]
...
Signed-off-by: Pratik Naik <pratiknaik@gmail.com >
2008-06-29 00:36:31 +01:00
rick
c9e366e997
all aasm tests without activerecord moved over and passing
2008-06-28 11:33:50 -07:00
rick
a9d9ca16c7
converted tests for more complex state transitions
2008-06-28 11:01:40 -07:00
rick
74cb056986
add basic events and transitions. still more tests to convert
2008-06-28 09:19:44 -07:00
rick
b9528ad3c5
initial statemachine machine and state classes
2008-06-28 00:55:02 -07:00
rick
b7c6ceff9a
tweak activemodel load order a bit
2008-06-27 23:29:47 -07:00
rick
aec3c7aa72
add special requires for ActiveSupport::Inflector so you can load it individually
2008-06-27 23:29:25 -07:00
rick
7fc628e3fc
convert specs to tests
2008-06-27 23:29:03 -07:00
Tim Chater
1415df8f49
Dirty: recognize when an integer changes from zero to blank. [ #433 state:resolved]
2008-06-27 21:31:06 -07:00
Pratik Naik
9a25315076
Add extra hash conditions tests for named_scope
2008-06-28 01:57:32 +01:00
Pratik Naik
cd994eff9a
Allow conditions on multiple tables to be specified using hash.
...
Examples:
User.all :joins => :items, :conditions => { :age => 10, :items => { :color => 'black' } }
Item.first :conditions => { :items => { :color => 'red' } }
Note : Hash key in :conditions is referring to the actual table name or the alias defined in query.
2008-06-28 01:27:51 +01:00
Jeremy Kemper
582bff71c4
Fix typo in apparently-dead will_unload? method.
2008-06-27 17:21:57 -07:00
Pratik Naik
76e00fc784
Ensure observer test inherits from ActiveSupport::TestCase
2008-06-27 18:18:39 +01:00
Pat George
4ddca325ee
Warn and uses singularized ModelName if a plural ModelName is given to script/generate. Override with --force-plural. [ #333 state:resolved]
...
Signed-off-by: Pratik Naik <pratiknaik@gmail.com >
2008-06-27 16:35:26 +01:00
Luca Guidi
66c2508ebb
Make sure mocha is available
2008-06-27 15:00:55 +02:00
Cheah Chu Yeow
3c1e8ab0fe
Allow single quote (the ' character) in the middle of URL when auto_link-ing. [ #471 state:resolved]
...
Signed-off-by: Pratik Naik <pratiknaik@gmail.com >
2008-06-27 13:46:17 +01:00
Jeremy Kemper
4498aad4ac
MySQL: treat integer with :limit => 11 as a display width, not byte size, for backward-compatibility.
2008-06-27 01:07:22 -07:00
Jan De Poorter
b2b761166d
Make sure associated has_many/habtm objects get saved even when :validate => false is used. [ #486 state:resolved]
...
Signed-off-by: Pratik Naik <pratiknaik@gmail.com >
2008-06-27 03:02:13 +01:00
Pratik Naik
5ca7d01eca
Cache sanitized conditions in reflection object for associations
2008-06-27 02:47:38 +01:00
Andre Arko
0b12da44aa
Extract owner_quoted_id so it can be overridden. [ #292 state:committed]
2008-06-25 19:04:09 -07:00
Bob Klosinski
a93ea88c06
Added Thin support to script/server. [ #488 state:resolved]
2008-06-25 18:56:52 -07:00
Jeremy Kemper
24c7f41b4f
Freeze ModelName cache_key also
2008-06-25 18:55:55 -07:00
Jeremy Kemper
c397260577
Performance: minor Column#text? and #number? speedups
2008-06-25 18:55:55 -07:00
Joshua Peek
339491a6b3
Set precompiled fixture load path constant to speed up tests
2008-06-25 15:24:12 -05:00
Joshua Peek
a9259ccfe0
Hide InlineTemplate class from ActionController and use ActionView's render API
2008-06-25 06:04:06 -05:00
Joshua Peek
ad772402c4
Made ActionView::Base#render_file private
2008-06-25 05:57:24 -05:00
Joshua Peek
6f5327013d
Consolidate CustomHandlerTest, TemplateFileTest, and TemplateObjectTest and test them at a higher level of abstraction in ViewRenderTest.
2008-06-25 05:49:38 -05:00
Jimmy Baker
670e22e372
Patched HTML::Document#initialize call to Node.parse so that it includes the strict argument. [ #330 ]
2008-06-24 23:11:35 -07:00
Jeremy Kemper
071fe79279
Include cache key in ModelName
2008-06-24 22:07:09 -07:00
Jeremy Kemper
6874caa407
Performance: minor Array#to_param and #to_query speedups
2008-06-24 21:49:49 -07:00
Jeremy Kemper
69e72af622
Improve readability
2008-06-24 11:53:49 -07:00
Jeremy Kemper
f6520b7dc7
Test for tinyint
2008-06-23 23:42:06 -07:00
Jeremy Kemper
b409474325
link_to_function and button_to_function shouldn't modify their options hashes
2008-06-23 23:41:21 -07:00
Jeremy Kemper
290e1e2fc5
Treat any limit > 4 as bigint
2008-06-23 18:16:03 -07:00
Cheah Chu Yeow
f1cfd12487
Allow script/about to run in production mode instead of failing with a cryptic const_missing error.
...
[#370 state:resolved]
2008-06-23 10:27:33 -07:00
Sven Fuchs
8461526f34
silence deprecation warning during validations test
2008-06-23 14:55:07 +02:00
Sven Fuchs
77177441d1
including rcov shell scripts for reference
2008-06-23 14:49:47 +02:00
Sven Fuchs
ac66865ea3
update tests according to removal of self.locale from helpers
2008-06-23 14:49:02 +02:00
Sven Fuchs
c178a87b43
remove call to self.locale from helpers
2008-06-23 14:37:50 +02:00
Sven Fuchs
2ee9f2a030
remove generic translate helpers
2008-06-23 14:34:01 +02:00
Sven Fuchs
0dddba41fc
rather cosmetic improvements of test coverage
2008-06-23 14:33:29 +02:00
Jeremy Kemper
d7462ea365
Revert "Check for mocha gem without requiring the lib. [ #403 state:resolved]"
...
This reverts commit 4d5ac3f3d2 .
2008-06-23 00:31:49 -07:00
Jeremy Kemper
4d5ac3f3d2
Check for mocha gem without requiring the lib. [ #403 state:resolved]
2008-06-22 20:52:29 -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
Tammer Saleh
bb6e8eea5a
Fixed polymorphic_url to be able to handle singleton resources.
...
Example usage:
polymorphic_url([:admin, @user, :blog, @post]) # => admin_user_blog_post_url(@user, @post)
[#461 state:resolved]
2008-06-22 18:58:47 -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
Jeremy Kemper
43cbcb10ae
nix extra newline
2008-06-22 16:22:23 -07:00
Jeremy Kemper
a73ac98123
Changelog for 509374e
2008-06-22 16:21:08 -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
Jeremy Kemper
a02d672cd7
Horo rdoc template
2008-06-22 10:38:25 -07:00
Sven Fuchs
3533dc6812
check self.locale instead of request.locale in helpers
2008-06-22 13:49:38 +02:00
Sven Fuchs
67fce4671e
crap, an array never has a request, stupid.
2008-06-22 13:49:08 +02:00
Sven Fuchs
20d6630c1b
Replaced country_options_for_select with old,
...
untranslated version and moved country-related helpers to a new
FormCountryHelper helper module so that they can easily be moved to a plugin.
Updated tests accordingly.
2008-06-22 11:41:51 +02:00
Sven Fuchs
d897acfbb1
remove DeprecatedConstantToMethodProxy again
2008-06-22 11:39:10 +02:00
Jeremy Kemper
f4ccc17953
Performance: javascript helper tweaks to speed up escaping and reduce object allocations when building options strings
2008-06-21 14:54:10 -07:00
Sven Fuchs
55e2e2e8b4
experimental DeprecatedConstantToMethodProxy
2008-06-21 18:12:59 +02:00
Sven Fuchs
8bfdabbd8b
incorporate #translate usage with several default keys
...
(use first default key that resolves to a translation). this might, depending
on the backend implementation save some expensive lookups (like db lookups)
2008-06-21 17:50:37 +02:00
Jeremy Kemper
9a0e443719
Everything responds to #to_param
2008-06-21 04:19:30 -07:00
Sven Fuchs
428aa24d24
Renamed lang/ to locale/ because that's what we seem to
...
standarize on. Also, in future this place can be used for data/code that's
not literally translations but conceptually belongs to the locale (like
custom pluralization algorithms etc.).
2008-06-21 11:35:02 +02:00
Sven Fuchs
c1e2506494
Changed process of storing translations from the
...
client libraries to the backend: clients now can pass a block to
backend#populate which can contain code to load and register translations.
This makes sense for backends that persist their translations (e.g. to db)
so the repeated loading and passing of translations throughout the server
startup would be wasted resources.
2008-06-21 11:27:19 +02:00
Jeremy Kemper
8d24a029df
Don't assume RubyProf constants are defined
2008-06-20 10:42:36 -07:00
David Heinemeier Hansson
161ab28b7c
Added block-handling to Enumerable#many? (Damian Janowski) [ #452 state:resolved]
2008-06-20 11:31:06 -05:00
Jeremy Kemper
00ba4c0cf3
true#to_param => true, so be sure to #to_s expanded cache keys
2008-06-20 00:46:00 -07:00
Jeremy Kemper
879245de1c
Tired of seeing <foo>/run
2008-06-20 00:36:59 -07:00
Jeremy Kemper
83c3e9903d
Don't profile GC runs/time by default
2008-06-20 00:35:11 -07:00
Jeremy Kemper
f47c81ff37
Fall back to #to_s for cache key expansion
2008-06-20 00:25:41 -07:00
Sven Fuchs
585c8c17c3
rename Backend::Simple#add_translations to set_translations
...
because it overwrites existing translations
2008-06-20 09:13:20 +02:00
Jeremy Kemper
72f93b581f
Check whether blocks are called from erb using a special __in_erb_template variable visible in block binding.
2008-06-19 22:21:56 -07:00
Jeremy Kemper
c440c9b199
Move erb_trim_mode setting to the ERB template handler. Keep a Base.erb_trim_mode= delegator around.
2008-06-19 17:18:07 -07:00
Pratik Naik
2e232af91f
Add performance test generator
2008-06-19 20:13:45 +01:00
Sven Fuchs
b09c6e7444
add a generic tranlate view helper
2008-06-19 19:08:14 +02:00
rick
10c581a6de
fix merge
2008-06-19 09:59:36 -07:00
Sven Fuchs
2fe4d350e9
make ActiveRecord::Errors.default_error_messages look up translated error messages
2008-06-19 18:31:11 +02:00
Sven Fuchs
fdb5f810dc
I18n has not been released as a gem, yet
2008-06-19 16:55:47 +02:00
Sven Fuchs
4a8486a1b1
add lang file for active_support
2008-06-19 16:43:30 +02:00
Sven Fuchs
45d41f0dad
integrating I18n into Rails
2008-06-19 16:25:27 +02:00
Jeremy Kemper
81025b5808
fix toplevel pdoc task
2008-06-18 23:17:02 -07:00
Jeremy Kemper
88796ad75a
Add toplevel doc to .gitignore
2008-06-18 23:16:01 -07:00
Jeremy Kemper
7e9a7c0f35
Require ssh publisher in toplevel Rakefile
2008-06-18 20:51:26 -07:00
Jeremy Kemper
4c720b7fbf
Add toplevel rdoc and pdoc tasks
2008-06-18 20:51:16 -07:00
Jeremy Kemper
15c3fc8da3
Add dummy pdoc task to railties
2008-06-18 20:34:24 -07:00
Jeremy Kemper
e96d557be0
Use rdoc exclude
2008-06-18 20:17:22 -07:00
Jeremy Kemper
803f41e97a
Add lib/rails/*.rb to rdoc
2008-06-18 20:17:16 -07:00
Jeremy Kemper
6e70573123
Use native include/exclude instead of doing it by hand
2008-06-18 20:17:10 -07:00
Jeremy Kemper
c52d9530c3
Exclude lib/activeresource.rb from rdoc
2008-06-18 20:17:05 -07:00
Jeremy Kemper
a61a2af6ed
Exclude lib/actionpack.rb from rdoc
2008-06-18 20:16:58 -07:00
Jeremy Kemper
8692e1722e
Generate rdoc for all .rb files except those in vendor
2008-06-18 20:05:38 -07:00
Jeremy Kemper
1e2544d536
Generate rdoc for all .rb files except those in vendor
2008-06-18 20:03:18 -07:00
Jeremy Kemper
9b3394f789
Add pdoc task to toplevel Rakefile
2008-06-18 19:58:33 -07:00
Jeremy Kemper
231c2c5709
Update Rakefiles to connect to wrath as current user. Use ssh config to set a different user.
2008-06-18 19:58:26 -07:00
Jeremy Kemper
1e0d2e36cc
Performance: add GC metrics for # of runs and total runtime
2008-06-18 19:19:22 -07:00
Jeremy Kemper
2541f7ac47
Oops, include metric name in csv filename
2008-06-18 18:36:04 -07:00
Jeremy Kemper
616bc42fd7
Performance: tweak unsupported metric error message
2008-06-18 18:34:25 -07:00
Jeremy Kemper
90a9a7013c
Write benchmark output to separate files per test+metric. Support Lloyd Hilaiel's GC.heap_info patch for current heap size.
2008-06-18 16:02:27 -07:00
Joshua Peek
40557e17dd
Improved test coverage for integration test's api
2008-06-17 21:25:51 -05:00
Joshua Peek
bec4b69a3b
Replaced TemplateFinder abstraction with ViewLoadPaths
2008-06-17 21:21:07 -05:00
Jeremy Kemper
6ffe32160e
Rely on quieter db:test:load task
2008-06-17 16:01:48 -07:00
Jeremy Kemper
e328bdaab6
Make Base.merge_conditions public
2008-06-17 16:01:48 -07:00
Jeremy Kemper
d7b3c3395f
Performance: PartialTemplate#initialize
2008-06-17 16:01:48 -07:00
David Heinemeier Hansson
8190bce8bc
Added block-call style to link_to [Sam Stephenson/DHH]
2008-06-17 17:37:29 -05:00
David Heinemeier Hansson
22af62cf48
Added Array#second through Array#tenth as aliases for Array#[1] through Array#[9] [DHH]
2008-06-17 17:37:29 -05:00
Luke Redpath
7650ff892c
Fix url_for with no arguments when default_url_options is not explicitly defined. [ #339 state:resolved]
...
Signed-off-by: Pratik Naik <pratiknaik@gmail.com >
2008-06-17 20:53:41 +01: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
Amos King
1b4b8fbbd9
verify :redirect_to => :back should redirect to the referrer. [ #280 state:resolved]
...
Signed-off-by: Pratik Naik <pratiknaik@gmail.com >
2008-06-17 18:08:56 +01:00
Andrew Kaspick
322f3eacf9
Correct code example in dom_id docs. [ #437 state:resolved]
2008-06-17 00:32:37 -07:00
Jeremy Kemper
8e74a434b8
Don't dump schema for every test run, just when migrations are run
2008-06-16 03:47:15 -07:00
Jeremy Kemper
899d63b997
process time for benchmarks (quicker), wall time for profiling (lower overhead)
2008-06-16 03:45:20 -07:00
Jeremy Kemper
e433bb16a6
Merge branch 'master' of git@github.com:rails/rails
2008-06-16 03:05:24 -07:00
Jeremy Kemper
fa2a255352
missed . joining rails version and git revision
2008-06-16 00:16:43 -07:00
Jeremy Kemper
ed67d90a98
Metrics::Memory measures in fractional KB also
2008-06-16 00:10:30 -07:00
Jeremy Kemper
49d19515b7
Extract environment. Hardcode some git info so I can start working with it now.
2008-06-16 00:08:39 -07:00
Jeremy Kemper
e8f78998b2
Force runs to be an integer. Start and stop RubyProf in same scope. Expect memory measurements in fractional KB now instead of bytes. Convert object allocation measurements to integer. Wrap up measure_mode in Metric instance method.
2008-06-15 21:47:28 -07:00
Jeremy Kemper
f93a6d99e6
Delegate run_test to @harness
2008-06-15 16:26:51 -07:00
Jeremy Kemper
09c70a0c03
Use test/performance/test_helper to do test setup then boost log level and turn on caching
2008-06-15 16:21:32 -07:00
Jeremy Kemper
59b2daba4f
Metrics::[] escues NameError only. Fix MODE typo.
2008-06-15 14:48:15 -07:00
Jeremy Kemper
f7866cdac1
Extract Metric and Performer. Simplify and refactor.
2008-06-15 14:41:18 -07:00
Pratik Naik
f31651bd6a
Reload cached templates when a new handler is registered
2008-06-15 17:20:31 +01:00
Joshua Peek
b415538b5d
Updated bundled TZInfo gem to version 0.3.9 for Ruby 1.9 compat
2008-06-14 15:18:55 -05:00
Jeremy Kemper
01a4af4a74
Pass printer class to output_filename
2008-06-14 03:29:30 -07:00
Jeremy Kemper
e3623bd9ed
Last commit message was meant for changelog.
2008-06-14 02:24:47 -07:00
Jeremy Kemper
eab71208db
Performance: integration test benchmarking and profiling. [Jeremy Kemper]
2008-06-14 02:04:38 -07:00
David Heinemeier Hansson
ba0f38f89e
Change Enumberal#several? to Enumberal#many?
2008-06-13 17:34:17 -05:00
Pratik Naik
eea4fe4c90
Make rescue template xhtml compatible [Sam Ruby] [ #415 status:resolved]
2008-06-13 23:23:44 +01:00
Jeremy Kemper
d62382afa3
Ruby 1.9 compat: instance_methods are symbols instead of strings. Use the quicker instance_method(sym) rescue false check.
2008-06-12 18:22:30 -07:00
Jeremy Kemper
579086047e
Remove superfluous test_process require
2008-06-12 18:19:40 -07:00
David Heinemeier Hansson
e536d4d888
Changed all generated tests to use the test/do declaration style [DHH]
2008-06-12 20:10:50 -05:00
David Heinemeier Hansson
f74ba37f4e
Added test/do declaration style testing to ActiveSupport::TestCase [DHH via Jay Fields]
2008-06-12 20:10:38 -05:00
David Heinemeier Hansson
048ac3604c
Revert "Ensure MemCacheStore is required when using CompressedMemCacheStore since they are lazy load now."
...
This reverts commit dd4181f47d .
2008-06-12 19:52:44 -05:00
David Heinemeier Hansson
6573f6a4bc
Revert "Lazy load cache and session stores"
...
This reverts commit 19895f087c .
2008-06-12 19:52:33 -05:00
David Heinemeier Hansson
a3caf28da3
Added Object#present? which is equivalent to !Object#blank? [DHH]
2008-06-12 18:30:56 -05:00
David Heinemeier Hansson
ea3a7e1bb1
Merge branch 'master' of git@github.com:rails/rails
2008-06-12 17:48:30 -05:00
David Heinemeier Hansson
556204abaf
Added Enumberable#several? to encapsulate collection.size > 1 [DHH]
2008-06-12 17:46:15 -05:00
Joshua Peek
dd4181f47d
Ensure MemCacheStore is required when using CompressedMemCacheStore since they are lazy load now.
2008-06-12 14:20:30 -05:00
Joshua Peek
d4c58c7928
Opps, I forgot to add template_handlers.rb to my index.
2008-06-11 22:22:05 -05:00
Joshua Peek
5ed162d7c1
Moved template handler registration into a mix-in module.
2008-06-11 22:05:36 -05:00
Jeremy Kemper
2275b8daab
Fix quoting in test_counting_with_single_conditions
2008-06-11 19:21:47 -07: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
Pratik Naik
65bc8f33de
Silence TimeZone warning
2008-06-11 17:11:34 +01:00
Jeremy Kemper
23df8befcd
supports_insert_with_returning? caches false result also
2008-06-11 09:06:36 -07:00
Jan De Poorter
d0b3685a0e
Added some has_many tests
...
Signed-off-by: Pratik Naik <pratiknaik@gmail.com >
2008-06-11 13:18:54 +01:00
Jan De Poorter
ca9641f8a7
Fix FormOptionsHelper tests.
...
Signed-off-by: Pratik Naik <pratiknaik@gmail.com >
2008-06-11 13:17:40 +01:00
Jonathan del Strother
3e07f320c1
Improve ActionCaching's format-handling
...
Make ActionCaching more aware of different mimetype formats.
It will now use request.format to look up the cache type, in addition to the path extension.
When expiring caches, the request format no longer affects which cache is expired.
Signed-off-by: Pratik Naik <pratiknaik@gmail.com >
2008-06-11 13:15:01 +01: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
Pratik Naik
f728e57d22
Make sure cache_template_loading works and don't use to_prepare callback
2008-06-11 09:36:41 +01:00
Ruy Asan
3f594299c8
TimeZone -> ActiveSupport::TimeZone. [ #387 state:resolved]
2008-06-11 00:49:13 -07:00
Grant Hollingworth
634e462a0b
Performance: speed up Hash#except. [ #382 state:resolved]
2008-06-11 00:47:02 -07:00
Joshua Peek
e8a0ba4c93
Ensure view path cache is rebuilt in production mode which was broke by df44df9.
2008-06-10 20:39:02 -05:00
Jeremy Kemper
6b280e5b54
Merge branch 'pg'
2008-06-10 18:33:15 -07:00
Jeremy Kemper
03bf727219
PostgreSQL: use 'INSERT ... RETURNING id' for 8.2 and later.
2008-06-10 18:31:37 -07:00
Pratik Naik
0ad0bdc01c
Delegate ActionView::Base#controller_name to controller
2008-06-10 23:55:04 +01: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
Jeremy Kemper
fb14c88e39
Inflector -> ActiveSupport::Inflector
2008-06-10 14:02:38 -07:00
Jeremy Kemper
34c51c9e8f
Rubinious: setup/teardown override for miniunit
2008-06-10 14:01:16 -07:00
Jeremy Kemper
f5cbad21ac
Rubinious: work around h[k] ||= v returning []= result instead of v
2008-06-10 14:01:16 -07:00
Pratik Naik
19895f087c
Lazy load cache and session stores
2008-06-10 10:29:25 +01:00
Luis Hurtado
225065709c
Fixes parsing deep nested resources from XML. [ #380 state:resolved]
2008-06-09 23:06:07 -07:00
Jeremy Kemper
16a9787bf0
Add empty setup and teardown methods to rule out default setup behavior in base class
2008-06-09 23:04:51 -07:00
rick
f545e19692
add deprecation for the #concat helper's 2nd argument, which is no longer needed
2008-06-09 14:18:21 -07:00
rick
64637da284
add deprecation for the #concat helper's 2nd argument, which is no longer needed
2008-06-09 12:06:23 -04:00
Brandon Keepers
e94e53f9cd
fix eager loading with dynamic finders
2008-06-09 12:05:20 -04:00
Joshua Peek
2336430471
Removed TemplateFinder.update_extension_cache_for since view path cache will be updated on boot.
2008-06-09 10:21:30 -05:00
Joshua Peek
55791c6c00
Removed used check_view_paths after 057768c
2008-06-09 10:05:02 -05: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
057768cd2c
Process view paths passed to AV::Base#initialize instead of raising.
2008-06-08 21:21:54 -07:00
Jeremy Kemper
c88f2b5e23
with_output_buffer returns the temporary buffer instead of the result of the block
2008-06-08 20:35:30 -07:00
Joshua Peek
df44df945d
Ensure ActionView::TemplateFinder view cache is rebuilt on initialize.
2008-06-08 22:31:54 -05:00
Joshua Peek
0c9281e821
Drop ActionController::Base.allow_concurrency flag
2008-06-08 22:11:50 -05:00
Jeremy Kemper
ff5f155f8d
Use output_buffer reader and writer methods exclusively instead of hitting the instance variable so others can override the methods.
2008-06-08 20:05:39 -07:00
rick
8bf74c30fe
change some more TimeZone references to ActiveSupport::TimeZone
2008-06-08 22:26:30 -04: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
rick
51e4106dcc
Add the gem load paths before the framework is loaded, so certain gems like RedCloth and BlueCloth can be frozen. [ #320 state:resolved]
2008-06-08 14:30:14 -04:00
rick
faad1e32a8
Fix discrepancies with loading rails/init.rb from gems. [ #324 state:resolved]
2008-06-08 14:04:04 -04:00
rick
138adbf156
Merge branch 'master' of git@github.com:rails/rails
2008-06-08 13:06:43 -04:00
Jacek Becela
86a042ddd9
Make plugins initialize also from rails/init.rb to ensure consistency with gems used as plugins
...
[#272 state:resolved]
2008-06-08 13:05:45 -04:00
Jeremy Kemper
b336ce9e06
Revert "Missed add: deprecated erb_variable test"
...
This reverts commit 56f5c5582c .
2008-06-08 13:04:00 -04:00
Jeremy Kemper
f42dab8221
Revert "Missed add: deprecated erb_variable test"
...
This reverts commit 56f5c5582c .
2008-06-08 01:36:33 -07:00
Jeremy Kemper
56f5c5582c
Missed add: deprecated erb_variable test
2008-06-08 01:32:57 -07:00
Jeremy Kemper
6c970d79a0
Performance: faster Object.subclasses_of
2008-06-08 00:35:36 -07:00
Joshua Peek
06b6f435cb
Wrap Initializer after_initialize inside mocha block.
2008-06-07 23:46:06 -05:00
Joshua Peek
d5539958a8
Wrap CGIResponse, LegacyRouteSet, Route, RouteSet and RouteLoading tests inside mocha block.
2008-06-07 23:42:05 -05:00
Joshua Peek
ceb5b6dbb1
Wrap date part value method tests inside a uses mocha block.
2008-06-07 23:25:34 -05:00
Jeremy Kemper
67e4f16fc5
No need to build a Set since we're iterating instead of checking for inclusion now
2008-06-07 18:06:45 -07:00
Jeremy Kemper
63679733d8
Changelog: More efficient concat and capture helpers. Remove ActionView::Base.erb_variable.
2008-06-07 17:48:44 -07:00
Jeremy Kemper
fce22c186d
Merge branch 'master' into erbout
2008-06-07 17:44:16 -07:00
Jeremy Kemper
d0956335a6
PostgreSQL: update create_database_with_encoding test also
2008-06-07 13:43:52 -07:00
Jeremy Kemper
21bb0f40b0
PostgreSQL: quote bare table names
2008-06-07 13:39:03 -07:00
Jeremy Kemper
fb9bf119fe
Merge branch 'master' into erbout
2008-06-06 22:27:03 -07:00
Jeremy Kemper
5b53a06959
Ensure we have an array to collect
2008-06-06 22:02:48 -07:00
Jeremy Kemper
5eb893f72d
Don't use deprecated String#each
2008-06-06 22:02:23 -07:00
Jeremy Kemper
011825e15a
Merge branch 'master' into erbout
2008-06-06 21:35:08 -07:00
Jeremy Kemper
84fb971c2f
Remove 1.9's String#chars also
2008-06-06 21:34:36 -07:00
Jeremy Kemper
deee9d22fe
Merge branch 'master' into erbout
2008-06-06 20:43:28 -07:00
Jeremy Kemper
1d1ea92f40
GemDependency#specification should be public
2008-06-06 20:41:22 -07:00
Jeremy Kemper
fe9d2ad6e8
Remove some internal dead code that supported content_for
2008-06-06 18:01:14 -07:00
Jeremy Kemper
26ec1be24a
concat should ignore nil
2008-06-06 18:00:01 -07:00
Jeremy Kemper
e732a405ab
javascript_tag should only concat when block_given?
2008-06-06 17:59:41 -07:00
Pratik Naik
89ea7bee36
Simplify ActiveRecord::Base#update_attribute
2008-06-07 01:25:27 +01:00
Jeremy Kemper
e79d47847a
Qualify Inflector in rdoc examples also. [ #356 state:resolved]
2008-06-06 13:03:59 -07:00
Jeremy Kemper
fec0f0678b
Merge branch 'master' into erbout
2008-06-06 04:13:23 -07:00
Jeremy Kemper
e2c49e6a59
Drop a string conversion from the often-called tag_options helper
2008-06-06 04:13:09 -07:00
Jeremy Kemper
fd40fbc198
Generate less garbage when expanding range bind variables in conditions
2008-06-06 03:54:16 -07:00
Jeremy Kemper
49c4c7b997
Merge branch 'master' into erbout
2008-06-06 03:41:47 -07:00
Jeremy Kemper
566d717d78
Move Class::ModelName to Active Support module core_ext
2008-06-06 03:38:05 -07:00
Jeremy Kemper
c1a98209da
Cache RecordIdentifier methods in Class#model_name wrapper
2008-06-06 03:03:30 -07:00
Jeremy Kemper
0ccd0b569a
Fix doc typo. Move extend self so it's more immediately obvious. Require inflections from load path.
2008-06-06 03:02:22 -07:00
Jeremy Kemper
9c9da5d927
Merge branch 'master' into erbout
2008-06-05 17:34:14 -07:00
Pratik Naik
1dbfe9766e
Ensure render :file works inside templates
2008-06-05 23:33:10 +01:00
Frederick Cheung
2e0765a003
Make partial counter start from 0.
...
Signed-off-by: Pratik Naik <pratiknaik@gmail.com >
2008-06-05 22:11:40 +01:00
Jeremy Kemper
e7f1556d0e
Merge branch 'master' into erbout
2008-06-05 13:25:33 -07:00
Pratik Naik
df8154c845
Fix that Rails::InfoController tests
2008-06-05 20:41:22 +01:00
Ryan Kinderman
ed0cb91a83
Ensure plugins' rake tasks are loaded before application's rake tasks. [ #259 state:resolved]
...
Signed-off-by: Pratik Naik <pratiknaik@gmail.com >
2008-06-05 12:44:38 +01:00
Joshua Peek
c4d570c2eb
Use CGI::Cookie::parse for request cookies until we officially deprecated CGI.
2008-06-04 22:32:09 -05:00
Joshua Peek
5fe2878973
Renamed StringQuestioneer to StringInquirer.
2008-06-04 15:06:32 -05:00
Joshua Peek
6e85f14817
Namespaced StringQuestioneer under ActiveSupport.
2008-06-04 15:02:51 -05:00
Joshua Peek
1e4fae42d4
Fixed deprecated call to Dependencies in plugin loader test.
2008-06-04 15:00:50 -05: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
Sean Huber
30a0ebb3eb
Add RJS#page.reload. [ #277 state:resolved]
...
Signed-off-by: Pratik Naik <pratiknaik@gmail.com >
2008-06-04 13:32:53 +01:00
Jeremy Kemper
53bcbfbdc1
Merge branch 'master' into erbout
2008-06-03 22:38:27 -07:00
David Heinemeier Hansson
82e96eb294
Dependencies move to ActiveSupport::Dependencies missed a few spots
2008-06-03 19:19:08 -05:00
David Heinemeier Hansson
885453537e
Merge branch 'master' of git@github.com:rails/rails
2008-06-03 18:12:56 -05:00
David Heinemeier Hansson
edfa195e2a
Fixed Request#remote_ip to only raise hell if the HTTP_CLIENT_IP and HTTP_X_FORWARDED_FOR doesnt match (not just if theyre both present) [Mark Imbriaco, Bradford Folkens]
2008-06-03 18:11:47 -05:00
Gabe da Silveira
025515b234
Fix assert_redirected_to for nested controllers and named routes
...
[#308 state:resolved]
Signed-off-by: Michael Koziarski <michael@koziarski.com >
2008-06-04 11:08:58 +12:00
Michael Koziarski
e3c26e9926
Merge branch 'master' into patches
2008-06-04 11:05:46 +12:00
David Heinemeier Hansson
8afa725f4b
Wrapped Rails.env in StringQuestioneer so you can do Rails.env.development? [DHH]
2008-06-03 17:44:56 -05:00
Steve Purcell
7cfa6ec8a3
Add more standard Hash methods to ActiveSupport::OrderedHash [ #314 state:resolved]
...
Signed-off-by: Joshua Peek <josh@joshpeek.com >
2008-06-03 14:15:33 -05:00
josevalim
d54d90f2b5
Allow caches_action to accept a layout option [ #198 state:resolved]
...
Signed-off-by: Joshua Peek <josh@joshpeek.com >
2008-06-03 14:02:51 -05: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
a977f3e88e
Fixed ambiguous first argument warning in ArrayExtTest.
2008-06-03 13:35:03 -05:00
Joshua Peek
c08547d226
Namespace Inflector, Dependencies, OrderedOptions, and TimeZone under ActiveSupport [ #238 state:resolved]
2008-06-03 13:32:53 -05:00
Jeremy Kemper
f55ad960d2
Stack @output_buffer for nested rendering
2008-06-03 01:10:00 -07:00
Jeremy Kemper
4d4c8e298f
Don't pass block binding to concat
2008-06-02 21:32:50 -07:00
Jeremy Kemper
0bdb7d353b
Work with @output_buffer instead of _erbout
2008-06-02 21:32:50 -07:00
Jeremy Kemper
933697a5fc
Try replacing _erbout with @output_buffer
2008-06-02 21:32:50 -07:00
David Heinemeier Hansson
da91450e68
Added tests [ #279 state:resolved] (Nicholas Schlueter)
2008-06-02 22:05:27 -05:00
David Heinemeier Hansson
64fea9c45c
Fixed Date#end_of_quarter to not blow up on May 31st [ #289 state:resolved] (Danger)
2008-06-02 22:02:43 -05:00
David Heinemeier Hansson
e7a305f08d
Fixed Base#exists? to check status code as integer [ #299 state:resolved] (Wes Oldenbeuving)
2008-06-02 21:58:42 -05:00
David Heinemeier Hansson
442d2f1032
Fixed that RailsInfoController wasnt considering all requests local in development mode (Edgard Castro) [ #310 state:resolved]
2008-06-02 21:55:42 -05:00
Joshua Peek
92050f6c6f
Ensure Rack processor reads CGI output_cookies for the session cookie.
2008-06-02 21:02:51 -05:00
David Heinemeier Hansson
29641ff05a
Fixed the brokeness from 952ec79bec
2008-06-02 19:00:25 -05:00
David Heinemeier Hansson
4b4aa8f6e0
AR can be disabled, new_rails_defaults.rb should check [ #303 state:resolved] (Jesper Hvirring Henriksen)
2008-06-02 18:43:08 -05:00
David Heinemeier Hansson
a855ab89b7
Added a test for Gzip
2008-06-02 17:42:10 -05:00
Pratik Naik
bd75a722a2
Ensure AR#sum result is typecasted properly
2008-06-02 20:41:11 +01:00
Cheah Chu Yeow
952ec79bec
Faster Hash#slice that doesn't use Enumerable#include?.
...
Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net >
2008-06-02 11:47:15 -07:00
Joshua Peek
714d42d1a6
Fixed initializer tests by stubbing out gems dependencies check.
2008-06-02 10:40:01 -05:00
Joshua Peek
185fe2e9cc
In 9c4f003, gem installation quotes versions. Do the same for unpack and update tests to reflect the change.
2008-06-02 09:54:36 -05:00
Marcos Tapajos
14a65cd982
Fixed changelog merge.
...
Signed-off-by: Joshua Peek <josh@joshpeek.com >
2008-06-02 09:47:53 -05: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
Joshua Peek
a980eb8c77
Added Rack middleware to handle static files.
2008-06-01 13:18:31 -07:00
Ezra Zygmuntowicz
06cb20708b
Added Rack processor
...
Signed-off-by: Joshua Peek <josh@joshpeek.com >
2008-06-01 11:25:11 -07: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
71528b1825
Previously we only added the "lib" subdirectory to the load path when
...
setting up gem dependencies for frozen gems. Now we add the "ext"
subdirectory as well for those gems which have compiled C extensions
as well. [Wincent Colaiuta]
[#268 state:resolved]
2008-05-31 17:22:16 -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
Jeremy Kemper
ea03b0885c
revert mysql test credential change
2008-05-31 17:07:44 -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
Michael Koziarski
ef21e01333
Remove dead code, and the tests for it.
2008-05-31 16:59: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
Michael Koziarski
b9a9b91a3e
Remove dead code, and the tests for it.
2008-05-31 16:58:24 -07:00
John D. Hume
61036a60eb
Substitute value into validates_format_of message
...
Signed-off-by: Michael Koziarski <michael@koziarski.com >
2008-05-31 16:58:24 -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
rick
a6e7908327
fix doc typos
2008-05-31 16:46:47 -07:00
Dmitriy Timokhin
224c8e6afb
Expose GemPlugin load_paths so they can be added to Dependencies.load_paths. Also use full_gem_path as root of GemPlugin to make things compatible. [ #213 state:resolved]
2008-05-31 16:46:13 -07:00
rick
d5bcff172b
Consolidate error messages for missing gems, and skip them when running rake gems:* tasks. [rick]
2008-05-31 16:36:34 -07:00
rick
2506e5c9a7
Merge branch 'master' of git@github.com:rails/rails
2008-05-31 15:59:01 -07:00
rick
9c4f00350a
fix Gem installation command with versions
2008-05-31 15:58:08 -07:00
Tim Morgan
fb89d7fa6d
Run gem install as external command. [ #210 state:resolved]
2008-05-31 15:57:03 -07:00
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
Jeremy Kemper
b5c8433a6f
Ruby 1.9 compat: qualify module name within module_evaled block
2008-05-19 12:57:42 -07:00
Jeremy Kemper
2b6bec5cdd
Workaround missing Test::Unit::TestCase::PASSTHROUGH_EXCEPTIONS in Ruby < 1.8.6. [ #224 state:resolved]
2008-05-19 11:16:21 -07:00
Chris Hapgood
e6f5079a48
Test for assert_response for failure response without an exception. [ #141 state:resolved]
...
Signed-off-by: Pratik Naik <pratiknaik@gmail.com >
2008-05-19 11:20:36 +01:00
José Valim
99860b72ae
Add fragment_exist? and exist? methods to cache stores. [ #203 state:resolved]
...
Signed-off-by: Pratik Naik <pratiknaik@gmail.com >
2008-05-19 10:38:59 +01:00
Frederick Cheung
17d1319c48
Ensure observe_field encodes value parameter. [ #216 state:resolved]
...
Signed-off-by: Pratik Naik <pratiknaik@gmail.com >
2008-05-19 10:30:56 +01:00
gbuesing
c1c1d6c2ea
Adding documentation for time zone features
2008-05-18 14:13:47 -05:00
gbuesing
cee9297c9b
Hash.from_xml: datetime xml types overflow to Ruby DateTime class when out of range of Time. Adding tests for utc offsets
2008-05-18 11:48:33 -05:00
gbuesing
cde9c09a52
TimeWithZone #+ and #- : ensure overflow to DateTime with Numeric arg
2008-05-18 11:15:29 -05:00
gbuesing
e30a263bf1
InstanceTag#default_time_from_options overflows to DateTime
2008-05-18 10:59:24 -05:00
gbuesing
be85868987
Time#to_json: don't convert to utc before encoding. References #175
2008-05-18 10:48:11 -05:00
gbuesing
0f333449bd
time_zone_select docs: explain priority zones option. Add example showing a custom set of priority zones.
2008-05-18 10:25:29 -05:00
Pratik Naik
2463e38efd
Deprecate ActionView::Base.cache_template_extensions
...
This commit deprecates unused ActionView::Base.cache_template_extensions option
and adds a deprecation warning for those having it in env specific config files.
Thanks to José Valim for pointing this out.
2008-05-17 12:22:15 +01:00
Steven Soroka
2183c220ad
Make sure clone_structure can load the results of dump_schema_information
...
SchemaStatements#dump_schema_information joins inserts with a single \n, but is later split on \n\n, and fails when trying to execute all the inserts as a single sql statement.
Signed-off-by: Michael Koziarski <michael@koziarski.com >
[#201 state:resolved]
2008-05-17 18:49:16 +12:00
Michael Koziarski
72ed17df44
ignore pkg too
2008-05-17 12:35:55 +12:00
Pratik Naik
46f30f902f
Merge documentation changes from docrails.
...
commit 0fc3381aa5
Author: Xavier Noria <fxn@hashref.com >
Date: Fri May 16 23:44:51 2008 +0200
Conventions. Formatting. Revising docs all over the rails.
This revision encourages the modern resource-oriented form_for usage. In addition corrects some markup and other details.
commit 70e4bcf5cb
Author: Chris Kampmeier <chris@kampers.net >
Date: Fri May 16 12:09:46 2008 -0700
Fix a couple spelling errors in docs
commit 6ea5e4208f
Author: Chris O'Sullivan <thechrisoshow@gmail.com >
Date: Fri May 16 16:09:11 2008 +0100
Added docs about source_type for has_one association
commit a01a0178be
Author: miloops <miloops@gmail.com >
Date: Wed May 14 09:22:39 2008 +0000
Change migration generator USAGE to explain the timestamped migrations behaviour
commit 4e2bc02163
Author: Xavier Noria <fxn@hashref.com >
Date: Fri May 16 00:43:03 2008 +0200
minor revision in url_for docs
Made explicit that RESTful and controller/action styles are not interchangeable, and revised some markup.
commit d6ecce66f4
Author: Michael Hartl <michael@michaelhartl.com >
Date: Thu May 15 10:46:40 2008 -0700
Expanded and updated the link_to documentation
commit b8c46c86f0
Author: Cody Fauser <cody@jadedpixel.com >
Date: Wed May 14 09:10:02 2008 -0400
Improve and cleanup ActionMailer documentation
commit 9546ee2999
Author: Yehuda Katz <wycats@gmail.com >
Date: Mon May 12 23:41:43 2008 -0700
Add documentation for Inflector.inflections
commit cbd5db8f51
Author: Manik Juneja <mjuneja@manik-junejas-computer.local >
Date: Mon May 12 23:43:31 2008 +0530
minor changes in railties/README. Added dbconsole introduction
commit 130a280dde
Author: Gaurav Sharma <gaurav@norbauer.com >
Date: Mon May 12 18:00:19 2008 +0530
adding documentation for cached_attributes
commit 164c958648
Author: TomK32 <tomk32@tomk32.de >
Date: Mon May 12 10:59:33 2008 +0200
proper heading for "Example:"
commit 35634feb47
Author: Matt Boehlig <thetamind@gmail.com >
Date: Sun May 11 16:46:07 2008 -0500
Cleanup whitespace and change_table documentation
commit 80bba28a1a
Author: Xavier Noria <fxn@hashref.com >
Date: Sun May 11 02:54:02 2008 +0200
documented the source annotation extractor
commit e6823bb165
Author: Mike Mondragon <mikemondragon@gmail.com >
Date: Fri May 9 13:49:56 2008 -0700
Added additional information about processing email with ActionMailer and the strategy one might want to employ to do so.
commit e6afd8b273
Author: Xavier Noria <fxn@hashref.com >
Date: Thu May 8 23:49:36 2008 +0200
corrected and completed docs of increment/decrement/toggle in AR::Base
commit 2fead68b31
Author: Austin Putman <austin@emmanuel.local >
Date: Wed May 7 19:35:46 2008 -0700
Documented class methods on ActionController::Routing. These are dangerous, and mostly used for testing.
commit f5b84182db
Author: Teflon Ted <github@rudiment.net >
Date: Wed May 7 16:08:49 2008 -0400
Added explanation about errant inflections not being patched in the future in order to avoid breaking legacy applications.
commit 370f4f5172
Author: Sunny Ripert <negatif@gmail.com >
Date: Wed May 7 14:00:59 2008 +0200
Applied list conventions in AR::Base
commit 5bd18429f0
Author: Sunny Ripert <negatif@gmail.com >
Date: Wed May 7 13:53:35 2008 +0200
Renamed Options list to Attributes list whenever they weren't option hashes in AR::Base
commit 2fa628e34b
Author: Xavier Noria <fxn@hashref.com >
Date: Wed May 7 11:52:33 2008 +0200
revised details in Exceptions section of AR::Base docs
commit d912bd5672
Author: Yaroslav Markin <yaroslav@markin.net >
Date: Wed May 7 13:50:28 2008 +0400
Add a filter_parameter_logging usage hint to generated ApplicationController.
This may help to remind the developer to filter sensitive information from application logs.
Closes #11578
commit f81d771f06
Author: Jack Danger Canty <git@6brand.com >
Date: Tue May 6 23:35:05 2008 -0700
doc: ActiveRecord::Reflection::AssociationReflection#through_reflection
Added documentation demonstrating the use of #through_reflection for
finding intervening reflection objects for HasManyThrough
and HasOneThrough.
commit ae6b46f00b
Author: Cheah Chu Yeow <chuyeow@gmail.com >
Date: Wed May 7 13:47:41 2008 +0800
Document AttributeAssignmentError and MultiparameterAssignmentErrors.
commit 8f463550b5
Author: John Barnette <jbarnette@gmail.com >
Date: Tue May 6 22:46:44 2008 -0700
Killing/fixing a bunch of outdated language in the AR README.
commit 284a930a93
Author: Jonathan Dance <jd@wuputah.com >
Date: Tue May 6 14:58:26 2008 -0400
improvements to the page caching docs
commit 9482da6213
Author: Sunny Ripert <negatif@gmail.com >
Date: Mon May 5 18:13:40 2008 +0200
validates_numericality_of() "integer" option really is "only_integer"
commit e9afd6790a
Author: Sunny Ripert <negatif@gmail.com >
Date: Mon May 5 12:11:59 2008 +0200
Harmonized hash notation in AR::Base
commit 67ebf14a91
Author: Sunny Ripert <negatif@gmail.com >
Date: Mon May 5 12:06:19 2008 +0200
Turned options into rdoc-lists in AR::Base
commit 0ec7c0a41d
Author: Marshall Huss <mwhuss@Macbook.local >
Date: Sun May 4 23:21:33 2008 -0400
Added information of how to set element_name in the case the user has a name confliction with an existing model
Signed-off-by: Pratik Naik <pratiknaik@gmail.com >
2008-05-16 23:21:35 +01:00
Sven Fuchs
345f030c5b
Ensure routing generator works with non-string keys. [ #172 state:resolved]
...
Make sure that (with recent correction to globbed parameter escaping) non-string
values can still be passed route generation helpers for globbed route segments.
For example, foo_path([1, 2, 3]) should still work for a route like map.foo "*globbed"
by implicitely calling to_s on the Fixnums.
Signed-off-by: Pratik Naik <pratiknaik@gmail.com >
2008-05-16 17:36:09 +01:00
Kyle Hargraves
77f873acf2
dbconsole should not require a username for postgresql. [ #207 state:resolved]
...
Signed-off-by: Pratik Naik <pratiknaik@gmail.com >
2008-05-16 13:10:14 +01:00
Eugene Pimenov
150717344a
auto_link helper fails to recognize links separated by space. [ #72 state:resolved]
...
Signed-off-by: Pratik Naik <pratiknaik@gmail.com >
2008-05-16 13:00:39 +01:00
Jake Howerton
3baf810482
Add rdoc task to activemodel. [ #156 state:resolved]
...
Signed-off-by: Pratik Naik <pratiknaik@gmail.com >
2008-05-16 10:35:09 +01:00
Rodrigo Kochenburger
5a3fd46d42
Fixing test for named_scope through a has_many :through
...
The test that checks if a has_many :through association has access to named_scope had a typo and
didn't have the proper fixtures loaded. [#190 state:resolved]
2008-05-15 17:56:23 -07:00
Martin Eisenhardt
fc02eabf29
Precompute TimeZone.us_zones [ #199 state:resolved]
...
Signed-off-by: Joshua Peek <josh@joshpeek.com >
2008-05-15 09:22:44 -05:00
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
Jacek Becela
a7ea06b4eb
Make render shorthands work with namespaced controllers
...
Signed-off-by: Pratik Naik <pratiknaik@gmail.com >
2008-05-10 11:28:19 +01:00
Chris Roos
6776edccf6
Escape globbed parameters in routes correctly.
...
:controller => 'glob', :action=> 'show', :additional => ['foo/bar', 'baz']
Should generate /glob/show/foo%2Fbar/baz not /glob/show/foo/bar/baz
2008-05-10 14:55:41 +12:00
Pratik Naik
dc4eec1129
Merge docrails:
...
commit e6afd8b273
Author: Xavier Noria <fxn@hashref.com >
Date: Thu May 8 23:49:36 2008 +0200
Overall documentation improvement and markup corrections. Zillion changes.
commit 2fead68b31
Author: Austin Putman <austin@emmanuel.local >
Date: Wed May 7 19:35:46 2008 -0700
Documented class methods on ActionController::Routing. These are dangerous, and mostly used for testing.
commit f5b84182db
Author: Teflon Ted <github@rudiment.net >
Date: Wed May 7 16:08:49 2008 -0400
Added explanation about errant inflections not being patched in the future in order to avoid breaking legacy applications.
commit 370f4f5172
Author: Sunny Ripert <negatif@gmail.com >
Date: Wed May 7 14:00:59 2008 +0200
Applied list conventions in AR::Base
commit 5bd18429f0
Author: Sunny Ripert <negatif@gmail.com >
Date: Wed May 7 13:53:35 2008 +0200
Renamed Options list to Attributes list whenever they weren't option hashes in AR::Base
commit d912bd5672
Author: Yaroslav Markin <yaroslav@markin.net >
Date: Wed May 7 13:50:28 2008 +0400
Add a filter_parameter_logging usage hint to generated ApplicationController.
This may help to remind the developer to filter sensitive information from application logs.
Closes #11578
commit b243de0db3
Author: Jack Danger Canty <git@6brand.com >
Date: Tue May 6 23:39:47 2008 -0700
doc: disambiguating an example ActiveRecord class
commit f81d771f06
Author: Jack Danger Canty <git@6brand.com >
Date: Tue May 6 23:35:05 2008 -0700
doc: ActiveRecord::Reflection::AssociationReflection#through_reflection
Added documentation demonstrating the use of #through_reflection for
finding intervening reflection objects for HasManyThrough
and HasOneThrough.
commit ae6b46f00b
Author: Cheah Chu Yeow <chuyeow@gmail.com >
Date: Wed May 7 13:47:41 2008 +0800
Document AttributeAssignmentError and MultiparameterAssignmentErrors.
commit 8f463550b5
Author: John Barnette <jbarnette@gmail.com >
Date: Tue May 6 22:46:44 2008 -0700
Killing/fixing a bunch of outdated language in the AR README.
commit aca44bcd92
Author: Cheah Chu Yeow <chuyeow@gmail.com >
Date: Wed May 7 13:34:52 2008 +0800
Make a note about ActiveResource::Timeouterror being raised when ARes calls timeout.
commit 284a930a93
Author: Jonathan Dance <jd@wuputah.com >
Date: Tue May 6 14:58:26 2008 -0400
improvements to the page caching docs
commit 9482da6213
Author: Sunny Ripert <negatif@gmail.com >
Date: Mon May 5 18:13:40 2008 +0200
validates_numericality_of() "integer" option really is "only_integer"
commit e9afd6790a
Author: Sunny Ripert <negatif@gmail.com >
Date: Mon May 5 12:11:59 2008 +0200
Harmonized hash notation in AR::Base
commit 67ebf14a91
Author: Sunny Ripert <negatif@gmail.com >
Date: Mon May 5 12:06:19 2008 +0200
Turned options into rdoc-lists in AR::Base
commit 0ec7c0a41d
Author: Marshall Huss <mwhuss@Macbook.local >
Date: Sun May 4 23:21:33 2008 -0400
Added information of how to set element_name in the case the user has a name confliction with an existing model
Signed-off-by: Pratik Naik <pratiknaik@gmail.com >
2008-05-09 10:40:50 +01:00
gbuesing
bfbf03ecee
ActionView::InstanceTag#default_time_from_options with hash args uses Time.current as default; respects hash settings when time falls in system local spring DST gap
2008-05-08 23:40:25 -05:00
gbuesing
66728087d0
Adding Date.current, which returns Time.zone.today if config.time_zone is set; otherwise returns Date.today. ActionView date_helper uses Date.current to determine locale-appropriate default
2008-05-08 22:48:47 -05:00
gbuesing
79e44a5ee4
Base#instantiate_time_object: eliminate check for Time.zone, since we can assume this is set if time_zone_aware_attributes is set to true
2008-05-08 22:21:51 -05:00
gbuesing
4f03190f26
TimeWithZone: date part getter methods (#year #mon #day etc) are defined on class; no longer relying on method_missing
2008-05-08 22:07:21 -05:00
gbuesing
618d695f11
Updating changelogs
2008-05-08 21:58:37 -05:00
gbuesing
06a7c2948a
Time.zone.parse: return nil for strings with no date information
2008-05-08 21:30:17 -05:00
gbuesing
fb9bf16e96
Time.zone.parse: compatibility with far future date with time zone offset in string. Eliminate creation of additional TimeWithZone instance to determine utc offset.
2008-05-08 20:56:38 -05:00
gbuesing
328fada610
ActiveRecord time zone aware attributes: blank string is treated as nil when assigned to writer
2008-05-08 20:31:54 -05:00
Scott Fleckenstein
eb5b93be74
Fix Time.zone.parse from stripping time zone information and make Time aware attribute methods use Time.zone.parse instead of to_time
2008-05-08 19:25:31 -05:00
Andreas Neuhaus
bcb090c56b
Calling ActiveRecord#inspect on an unloaded association won't wipe the collection [ #9 state:resolved]
...
Signed-off-by: Joshua Peek <josh@joshpeek.com >
2008-05-08 00:04:53 -05:00
Jeremy Kemper
2561732a08
Some dbconsole tweaks. [ #102 state:resolved]
2008-05-07 13:54:02 -07:00
Jeremy Kemper
b510d8bfd8
Add script/dbconsole to app generator
2008-05-07 13:52:00 -07:00
Steve Purcell
4a07103687
Add 'script/dbconsole' -- the database analog of 'script/console'
2008-05-07 13:52:00 -07:00
Tarmo Tänav
0a21193dc6
create_table :force => true no longer tries to drop a non-existing table
...
Signed-off-by: Michael Koziarski <michael@koziarski.com >
2008-05-07 13:01:46 +12:00
Tarmo Tänav
8877ab5852
Added AbstractAdapter#table_exists? and made AbstractAdapter#table implementation non-optional
...
Signed-off-by: Michael Koziarski <michael@koziarski.com >
2008-05-07 13:01:46 +12:00
Pratik Naik
e520fd5db7
Delegate action_name to controller inside views.
2008-05-06 12:02:24 +01:00
Pratik Naik
a53331a161
Add class to deprecate instance variables
...
Add ActiveSupport::Deprecation::DeprecatedInstanceVariable class to
deprecate instance variables of primitive types such as stings.
2008-05-06 11:52:44 +01:00
rick
c8451aeeea
change ActionController::RequestForgeryProtection to use Mime::Type#verify_request? [ #73 ]
2008-05-06 02:58:32 -07:00
Marcos Arias
2c39836dc3
Refactored and fixed Resources.map_member_actions to make use of custom ActionController::Base.resources_path_names when the option :path_names is not directly specified. Added a specific test for this functionality and fixed assert_restful_routes_for test helper to make use of ActionController::Base.resources_path_names instead of just "new" or "edit".
...
Signed-off-by: Michael Koziarski <michael@koziarski.com >
[#111 state:resolved]
2008-05-06 21:48:07 +12:00
John Devine
8ded457b1b
Added logic to associations.rb to make sure select_for_limited_ids
...
includes joins that are needed to reach tables listed in the :order
or :conditions options if they are not joined directly to the main
active_record table.
Signed-off-by: Michael Koziarski <michael@koziarski.com >
[#109 state:resolved]
2008-05-06 21:47:10 +12:00
Frederick Cheung
fbebdb0c09
Ensure correct record is returned when preloading has_one where more than one row exists
...
Signed-off-by: Michael Koziarski <michael@koziarski.com >
[#73 state:closed]
2008-05-06 21:08:52 +12:00
Michael Koziarski
a08004a9a7
Merge branch 'master' of git@github.com:rails/rails
2008-05-06 20:53:56 +12:00
rick
92e2e5990c
include bugfix to [ e792d4ab70] for rubygems 1.0.1. Gem::DependencyList#dependency_order was bombing with nil specs passed in from a frozen gem. [ #122 ]
2008-05-06 01:20:59 -07:00
rick
0697d17d12
Change the request forgery protection to go by Content-Type instead of request.format so that you can't bypass it by POSTing to "#{request.uri}.xml" [ #73 state:resolved]
2008-05-06 00:42:24 -07:00
Andrew Vit
04f52219f1
Fixed form helper's name attribute for question methods
2008-05-06 00:03:32 -07:00
rick
123e55686d
Fix bug where plugin init.rb files from frozen gem specs weren't being run. (pjb3) [ #122 state:resolved]
2008-05-06 00:01:37 -07:00
rick
9c2657aa96
Merge commit 'e792d4ab70448f79142fdf492390682ff5ea6398'
2008-05-05 23:55:10 -07:00
rick
37599d16f2
regression test for bug introduced in [ 6a6b4392c1] [Ian White] [ #22 state:resolved]
2008-05-05 23:42:52 -07:00
Cheah Chu Yeow
ee1d508a6b
Allow ActionController::Base#default_url_options to have a default options argument of nil.
...
This fixes a bug introduced in [6a6b4392c1 ] which was breaking routing in ActionController::UrlWriter.
2008-05-05 23:41:33 -07:00
Kyle Hargraves
04d8554860
Restore dump_schema_information connection adapter method
2008-05-05 23:25:22 -07:00
rick
0052938ac5
Merge commit 'core/master'
2008-05-05 23:19:21 -07:00
Paul Barry
e792d4ab70
Added code to make initialization process call rails/init.rb for unpacked gems
2008-05-06 00:52:12 -04:00
Joshua Peek
3cffe92ff0
Added Ruby 1.8 implementation of Process.daemon
2008-05-05 10:22:29 -05:00
Sean Ouimet
d75525b045
Added OrderedHash#delete [ #113 state:resolved]
...
Signed-off-by: Joshua Peek <josh@joshpeek.com >
2008-05-05 10:03:11 -05:00
Joshua Peek
a40223d36d
Preload TimeZone zones for thread safety.
2008-05-04 21:53:07 -05:00
Joshua Peek
36662ed08e
Replaced unnecessary class variable with a constant in whiny nil.
2008-05-04 21:11:03 -05:00
Pete Deffendol
c26d10563e
PostgreSQL: update rake tasks to use full settings from database.yml
...
Signed-off-by: Michael Koziarski <michael@koziarski.com >
2008-05-04 15:59:34 +12:00
Cheah Chu Yeow
6a6b4392c1
Ensure that default_url_options, if defined, are used in named routes.
...
Signed-off-by: Michael Koziarski <michael@koziarski.com >
[#22 state:resolved]
2008-05-04 12:49:44 +12:00
Michael Koziarski
437f918646
Allow custom loggers to work with script/server.
...
Instead of requiring the initializer and initializing the logger, create the file manually before tailing it.
[atnan] Closes #8665 (trac)
2008-05-04 12:31:34 +12:00
Pete Deffendol
205750c8de
PostgreSQL: Connect to template1 database when creating or dropping db
...
* The template1 database is always available on a PostgreSQL install
* The previous behavior expected a database with the same name as the
connecting user, which may not be available
Signed-off-by: Michael Koziarski <michael@koziarski.com >
[#38 state:resolved]
2008-05-04 12:20:14 +12:00
David Heinemeier Hansson
96980bd561
Added change_table for migrations (Jeff Dean) [ #71 state:resolved]
2008-05-03 11:29:47 -05:00
Xavier Noria
64092de257
Improve documentation coverage and markup
...
Signed-off-by: Pratik Naik <pratiknaik@gmail.com >
2008-05-02 14:45:23 +01:00
Pratik Naik
87ec72bd8c
Improve PartialTemplate tests
2008-05-02 10:45:08 +01:00
Nathan Weizenbaum
b88a6dbc39
Capture view errors in ActionView::Template.
...
This means that errors raised by partials are caught by ActionView::PartialTemplate,
which in turn means they have the proper filename and line number information.
Signed-off-by: Pratik Naik <pratiknaik@gmail.com >
2008-05-02 10:28:53 +01:00
David Heinemeier Hansson
f6ec296ad8
Fixed that TextHelper#text_field would corrypt when raw HTML was used as the value (mchenryc, Kevin Glowacz) [ #80 state:resolved]
2008-05-01 17:56:32 -05:00
David Heinemeier Hansson
12288a0341
Merge branch 'master' of git@github.com:rails/rails
2008-05-01 17:26:46 -05:00
David Heinemeier Hansson
926f4648f0
Made the location of the routes file configurable with config.routes_configuration_file (Scott Fleckenstein) [ #88 state:resolved]
2008-05-01 17:26:31 -05:00
Tobias Lütke
f48e89931f
Accept header mime parser can now deal with empty fields
2008-05-01 17:45:14 -04:00
Jeremy Kemper
f122ca5874
Ruby 1.9 compat: don't shadow local with block var
2008-05-01 14:05:55 -07:00
Jeremy Kemper
e931394d09
Fix failing associate_with_create tests inserting null first_name
2008-05-01 13:53:10 -07:00
David Heinemeier Hansson
8e8a8b55b9
Merge branch 'master' of git@github.com:rails/rails
2008-05-01 15:41:34 -05:00
Jeremy Kemper
c699a4daf1
Ruby 1.9 compat: compatibility wrapper for new Module#const_defined? behavior
2008-05-01 13:34:31 -07:00
David Heinemeier Hansson
ab4d455d6d
Added missing files
2008-05-01 15:03:16 -05:00
Hongli Lai (Phusion
1f2a4b37ac
Prevent AssetTagHelper from crashing if RAILS_ROOT is not defined. Fixes compatibility with Passenger. [ #84 state:resolved]
...
Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net >
2008-05-01 12:45:03 -07:00
David Heinemeier Hansson
e2af713d1c
Merge branch 'master' of git@github.com:rails/rails
2008-05-01 14:32:50 -05:00
Steven Soroka
9c20391bbe
best solution?
...
Signed-off-by: Steven Soroka <ssoroka78@gmail.com >
2008-05-01 14:22:55 -05:00
Pratik Naik
74436d2203
Fixed render :template for templates in top level of view path. [ #54 state:resolved]
2008-05-01 10:21:46 +01:00
David Heinemeier Hansson
6f20efdaf7
Fixed AssociationsPreload such that it doesnt require foreign keys to be integers (fcheung) [ #33 state:resolved]
2008-04-30 23:30:50 -05:00
David Heinemeier Hansson
1eb686a0e5
Cheaper Dependencies#log_call to resolve irritating error message w/ rake db:create (Sven) [ #56 state:resolved]
2008-04-30 23:20:59 -05:00
David Heinemeier Hansson
dd120ede53
Added block-setting of attributes for Base.create like Base.new already has (Adam Meehan) [ #39 state:resolved]
2008-04-30 23:14:32 -05:00
Kevin Glowacz
c83f75812e
Fixed labels that have a bracketed name and an index [ #68 state:resolved]
...
Signed-off-by: Joshua Peek <josh@joshpeek.com >
2008-04-30 17:21:18 -05:00
Joshua Peek
96d9691e71
FormHelper#label_tag accepts :for option [encoded] [ #38 state:resolved]
2008-04-30 17:14:28 -05:00
Rhett Sutphin
b4c33711c5
Fixed fixture caching with prefixed or suffixed tables.
...
Signed-off-by: Joshua Peek <josh@joshpeek.com >
2008-04-30 16:59:22 -05:00
David Heinemeier Hansson
c353794dff
Fixed that pessimistic locking you reference the quoted table name (Josh Susser) [ #67 state:resolved]
2008-04-30 15:04:08 -05:00
David Heinemeier Hansson
5cef8bcc54
Forgot these
2008-04-30 15:00:59 -05:00
David Heinemeier Hansson
d327496ab7
Fixed tests (and the weird assumption that no logger would mean that the code wasnt run)
2008-04-30 15:00:15 -05:00
David Heinemeier Hansson
56861af733
Added test for has_one partial rendering (keeran) [ #43 state:resolved]
2008-04-30 14:59:24 -05:00
David Heinemeier Hansson
a3da293b33
Fixed render :partial => @collection.named_scope (nkallen) [ #61 state:resolved]
2008-04-30 14:42:44 -05:00
Frederick Cheung
a6cca5d1fc
Ensure postgresql tests work when starting from scratch.
2008-04-30 21:54:54 +12:00
David Heinemeier Hansson
874603ce8d
Change tests against all scope to base scope as all is now used as a finder alias
2008-04-30 00:25:52 -05:00
David Heinemeier Hansson
1282ddaadc
Fixed tabs to spaces [ #47 state:resolved]
2008-04-29 17:23:50 -05:00
David Heinemeier Hansson
869d731cca
Fixed response logging to use length instead of the entire thing (seangeo) [ #27 state:resolved]
2008-04-29 17:16:36 -05:00
David Heinemeier Hansson
10ef65a3b0
Fixed that change_column should be able to use :null => true on a field that formerly had false [Nate Wiger] [ #26 state:resolved]
2008-04-29 16:52:52 -05:00
David Heinemeier Hansson
5514baf63d
Merge branch 'master' of git@github.com:rails/rails
2008-04-29 16:43:47 -05:00
David Heinemeier Hansson
0780563ae7
Default integer need not specify a limit [ #20371 state:resolved] (matthuhiggins)
2008-04-29 16:43:23 -05:00
Tobias Lütke
5be5305877
Add missing clear method to memory_store
2008-04-29 16:34:01 -04:00
Tobias Lütke
09517e3aea
Allow access to mem_cache_store's stats hash
2008-04-29 15:28:24 -04:00
Tobias Lütke
fef82759ff
Implement increment/decrement on cache storage engines, using read/write by default and using atomic command on memcache
2008-04-29 15:12:47 -04:00
Tobias Lütke
9f07b1edcd
By default rails will update keys in memcached when using Rails.cache.write. Use :unless_exist => true flag to prevent existing keys from being overwritten.
2008-04-29 14:57:21 -04:00
Jeremy Kemper
bfb54aefa6
Clarify confusing ActionController::Base.allow_concurrency flag.
2008-04-28 22:10:19 -07:00
Jeremy Kemper
1c66ece244
Note that allow_concurrency = true means you need to verify_active_connections! to clear out connections assigned to stale threads.
2008-04-28 22:05:06 -07:00
Jeremy Kemper
90f6062f7d
run prepare callbacks after after_initialize blocks so config.to_prepare actually works
2008-04-28 12:02:50 -07:00
David Heinemeier Hansson
9a80e97d58
Merge branch 'master' of git@github.com:rails/rails
2008-04-28 13:29:23 -05:00
David Heinemeier Hansson
0a6980f2dc
Let Base.all use conditions etc like first/last
2008-04-28 13:27:52 -05:00
Jeremy Kemper
642bcd2d01
Ruby 1.9 compat: force assert_select text encoding to the encoding of the regexp it's matching against.
2008-04-28 10:52:23 -07:00
Michael Koziarski
8af98c3f81
Revert alias_method_chain exceptions as they broke aliasing class methods.
...
This reverts commit be48cad9a4 .
2008-04-28 16:54:09 +12:00
John Barnette
be48cad9a4
Make alias_method_chain complain about duplicate aliases. Previously
...
repeated calls to alias_method_chain would cause infinite loops.
Signed-Off-By: Michael Koziarski <michael@koziarski.com >
2008-04-28 16:23:46 +12:00
David Heinemeier Hansson
850aba5473
Fixed that BenchmarkHelper should use controller.logger instead of @logger (which now apparently is gone)
2008-04-27 22:46:19 -05:00
David Heinemeier Hansson
dc2d693014
Added ActionController::TestCase#rescue_action_in_public! to control whether the action under test should use the regular rescue_action path instead of simply raising the exception inline (great for error testing) [DHH]
2008-04-27 19:42:13 -05:00
David Heinemeier Hansson
027f0f822f
Merge branch 'master' of git@github.com:rails/rails
2008-04-27 17:16:05 -05:00
David Heinemeier Hansson
162c7c1908
Changing "and" to && whereever I catch it
2008-04-27 17:15:50 -05:00
John Barnette
7f4171da5e
Be friendlier when upgrading apps with an old boot.rb.
...
If Rails doesn't respond to vendor_rails?, abort with an error asking
the user to run 'rake rails:update'.
Signed-Off-By: Michael Koziarski <michael@koziarski.com >
2008-04-28 09:16:13 +12:00
Aliaksey Kandratsenka
361aaa04ef
Remove old :limit removal code from find_initial, logic is now handled in the preloading and eager loading code.
...
Signed-off-by: Michael Koziarski <michael@koziarski.com >
2008-04-27 20:01:05 +12:00
Michael Koziarski
f3fd44f76b
Add default options to file_store to make it align with the other cache stores. [monki]
...
[#40 state:resolved]
2008-04-26 12:21:36 +12:00
Frederick Cheung
44d2142352
Ensure table names are quoted by the association preloading code.
...
[#45 state:resolved]
Signed-off-by: Michael Koziarski <michael@koziarski.com >
2008-04-26 12:14:50 +12:00
David Heinemeier Hansson
a37546517d
Added that the MySQL adapter should map integer to either smallint, int, or bigint depending on the :limit just like PostgreSQL [DHH]
2008-04-25 16:33:00 -05:00
Pratik Naik
1959db3246
Pass template object to Handler#compile
2008-04-24 16:58:09 +01:00
Joshua Peek
a0748848b6
Use .gitignore as the convention for dummy file names.
2008-04-24 09:20:04 -05:00
rick
eacb5cf0ca
Merge branch 'master' of git@github.com:rails/rails
2008-04-23 12:14:59 -07:00
David Dollar
6c1c16bfd9
Fixes a subtle bug when using symbols for key definitions in habtm associations
2008-04-23 21:02:00 +12:00
Sam Granieri
30ad1827a6
preventing generated documentation from being picked up by git. [ #37 state:resolved]
...
Signed-off-by: Michael Koziarski <michael@koziarski.com >
2008-04-23 20:27:23 +12:00
Eugene Pimenov
e6a3ce3392
Make sure member names aren't mistakenly set to nil when providing :path_names
...
[#19 state:resolved]
Signed-off-by: Michael Koziarski <michael@koziarski.com >
2008-04-23 20:19:22 +12:00
Joshua Bates
b6aa0e13b4
Fix include? on has_many collections with finder_sql to fall back to Array include? rather than try to use SQL.
...
[#18 state:resolved]
2008-04-23 20:18:09 +12:00
Frederick Cheung
ae51013c3f
Provide data for the key column otherwise adding a unique index will fail. [ #30 state:closed]
2008-04-23 14:24:20 +12:00
Francesc Esplugas
bf1b1e0925
Rails Edge info returns the latest git commit hash [ #36 state:resolved]
...
Signed-off-by: Joshua Peek <josh@joshpeek.com >
2008-04-22 15:44:13 -05:00
Frederick Cheung
a4fc93c3a9
Use schema.rb for all databases
...
Move adapter specific schema into their own files
Signed-off-by: Michael Koziarski <michael@koziarski.com >
2008-04-22 13:55:13 +12:00
Joshua Peek
0a94f16b95
Fallback to Ruby's pseudo random number generator if the system does not have SHA512 installed.
2008-04-21 19:49:16 -05:00
Joshua Peek
de8b0087c6
Don't require generator_test_helper in RailsGeneratorTest.
2008-04-21 19:14:37 -05:00
Joshua Peek
6ccfc0ebde
Add .empty files to empty directories so git preserves them.
2008-04-21 19:09:46 -05:00
Cheah Chu Yeow
cf32baf915
Rescue from Timeout::Error in ActiveResource::Connection.
...
Signed-off-by: Michael Koziarski <michael@koziarski.com >
2008-04-22 09:30:56 +12:00
Cheah Chu Yeow
105910429d
Introduce ActiveResource::Base.timeout. This allows a timeout to be set on the internal Net::HTTP instance ARes uses (default is 60 seconds). Setting a low timeout allows ARes clients to fail-fast in the event of a unresponsive/crashed server, rather than cause cascading failures in your application.
...
Signed-off-by: Michael Koziarski <michael@koziarski.com >
2008-04-22 09:30:41 +12:00
Cody Fauser
4809dcc1b5
* Remove default_url_options from mailer generator
...
* Improve mailer documentation regarding generating URLs
* Add no_match to mailer generator to warn contributors about default_url_options
Signed-off-by: Joshua Peek <josh@joshpeek.com >
2008-04-21 14:31:54 -05:00
Joshua Peek
4ac33de4d6
Add back empty plugin folders that were lost when we moved to git.
2008-04-21 13:48:44 -05:00
Joshua Peek
1d09ccd949
Revert "Update plugin loading tests to reflect changes in plugin fixtures."
...
This reverts commit eef9002968 .
2008-04-21 13:27:19 -05:00
Joshua Peek
eef9002968
Update plugin loading tests to reflect changes in plugin fixtures.
2008-04-21 13:24:38 -05:00
Joshua Peek
1642b2362e
Gem dependencies don't require a version. Also fixed up failing gem dependency tests.
2008-04-21 12:23:15 -05:00
Joshua Peek
1a29a67178
Mock RailsFCGIHandler and Dispatcher to stop mocha deprecation warnings.
2008-04-21 11:54:46 -05:00
Pratik Naik
6dbe90dd9b
Alias Object#instance_variable_names to Object#instance_variables for Ruby 1.8.x
2008-04-21 12:03:01 +01:00
Pratik Naik
a04f022877
Delegate ivars to controller instead of copying
...
Reduce number of instance variables being copied from controller to
view. Instead, delegate them to controller instance.
2008-04-21 11:53:14 +01:00
gbuesing
f757f58388
select_datetime and select_time default to Time.zone.now when config.time_zone is set
2008-04-21 00:40:04 -05:00
gbuesing
c2c779044f
datetime_select defaults to Time.zone.now when config.time_zone is set
2008-04-21 00:08:45 -05:00
Steven Soroka
f386676661
Use the rails user when creating and dropping the database rather than falling back to the currently logged in user who may or may not have CREATE / DROP privileges and no password.
...
Closes #11564 (trac)
2008-04-21 16:42:15 +12:00
gbuesing
6ef4239f8b
Merge branch 'master' of git@github.com:rails/rails
2008-04-20 21:57:56 -05:00
gbuesing
32b82e4c6f
Duration #since and #ago with no argument (e.g., 5.days.ago) return TimeWithZone when config.time_zone is set. Introducing Time.current, which returns Time.zone.now if config.time_zone is set, otherwise just returns Time.now
2008-04-20 21:57:04 -05:00
Jeremy Kemper
1d18651ea3
Ruby 1.8.7 compat: detect and alias non-superclass DateTime#to_s
2008-04-20 19:56:01 -07:00
Jeremy Kemper
0b21ac5118
Ruby 1.8.7 compat: override unordered Enumerable#group_by
2008-04-20 19:56:01 -07:00
Jeremy Kemper
549c81db4a
Ruby 1.8.7 compat: String#start_with? and #end_with?
2008-04-20 19:56:01 -07:00
Pratik Naik
2b69840e5e
Remove ActionController::Base#view_controller_internals
...
Get rid of ActionController::Base#view_controller_internals flag and
use @@protected_view_variables for storing the list of controller
specific instance variables which should be inaccessible inside views.
2008-04-21 03:45:38 +01:00
Pratik Naik
caa03a5c87
Remove ActionController::Base#add_class_variables_to_assigns
2008-04-21 02:43:48 +01:00
Jeremy Kemper
ef8d26653d
Merge commit 'rails/master'
2008-04-20 16:50:41 -07:00
Jeremy Kemper
59f5d4fc79
Use append_features instead of included to get the inclusion order right
2008-04-20 16:49:58 -07:00
Frederick Cheung
55622e0bde
Avoid adding two DISTINCT statements to queries in sqlite 2.
2008-04-21 11:47:15 +12:00
Frederick Cheung
a2028a7d7b
Fix sqlite adapter to work with the quoted table names returned by later versions of sqlite3.
2008-04-21 11:45:48 +12:00
Jeremy Kemper
3b93ca221d
Merge commit 'rails/master'
2008-04-20 15:30:41 -07:00
Joshua Peek
46ab7422d9
Use define_callbacks helper for ActiveRecord validations.
2008-04-20 11:45:44 -05:00
Jeremy Kemper
daab53d8c0
Incompatible Symbol#to_proc was reverted upstream
2008-04-20 03:52:13 -07:00
Jeremy Kemper
f67b070fac
Override incompatible 1.8.7p1 String#chars
2008-04-19 17:16:19 -07:00
Jeremy Kemper
715db1a797
Feature check :force_encoding instead of RUBY_VERSION
2008-04-19 17:15:50 -07:00
Paul Horsfall
14a40804a2
Add conditional options to caches_page method [ #25 state:resolved]
...
Signed-off-by: Joshua Peek <josh@joshpeek.com >
2008-04-19 16:21:34 -05:00
Pratik Naik
3f8d3cd04f
Remove unused ignore_missing_templates option
2008-04-19 19:26:56 +01:00
Joshua Peek
17d4164a16
Introduce ActionView::TestCase for testing view helpers.
2008-04-19 13:08:24 -05:00
Pratik Naik
ef4c65088f
Move missing template logic to ActionView
2008-04-19 18:59:13 +01:00
Pratik Naik
534c6b2444
Introduce ActionView::InlineTemplate class
2008-04-19 16:21:18 +01:00
Mislav Marohnić
69a5c1df82
Add example for default_url_options[:host] to generated mailers.
...
Signed-off-by: Joshua Peek <josh@joshpeek.com >
2008-04-18 17:19:28 -05:00
Joshua Peek
29ea0f68aa
Merge branch 'master' of git@github.com:josh/rails
2008-04-18 17:14:52 -05:00
Mislav Marohnić
36eecda8d0
Changed mailer generator to not use instance variables.
...
Signed-off-by: Joshua Peek <josh@joshpeek.com >
2008-04-18 17:13:15 -05:00
Mislav Marohnić
dfdb9f738e
Cleanup generator tests by extracting repeated code into generator_test_helper. Add test for mailer generator.
...
Signed-off-by: Joshua Peek <josh@joshpeek.com >
2008-04-18 17:10:58 -05:00
Jeremy Kemper
db11ef9546
Override Ruby 1.8.7's incompatible Symbol#to_proc.
2008-04-18 14:50:20 -07:00
Joshua Peek
a4c15303cb
Slight optimization to CallbackChain#union and delete.
2008-04-18 14:44:55 -05:00
Pratik Naik
986aec5dbb
Refactor Dispatcher callbacks to remove unnecessary Dependencies checks in production environment.
2008-04-18 13:05:43 +01:00
Joshua Peek
cf04e62127
Tidy up ActiveSupport::Callbacks::CallbackChain instance API.
2008-04-17 23:30:01 -05:00
rick
69d29e80f7
Merge branch 'master' of git@github.com:rails/rails
2008-04-17 17:22:03 -07:00
Ian White
82b4faf812
Fix migrations when migrating to a specified version number with a fresh database [ #1 state:resolved]
...
Signed-off-by: Joshua Peek <josh@joshpeek.com >
2008-04-17 13:43:47 -05:00
jweiss
9e1d506a8c
Support options passed to ActiveSupport::Cache :mem_cache_store [ #14 state:resolved]
...
Signed-off-by: Joshua Peek <josh@joshpeek.com >
2008-04-17 12:58:31 -05:00
Joshua Peek
9e53b63601
Ignore debug logs and ensure ActiveResource's log is cleaned up.
2008-04-16 13:17:03 -05:00
Joshua Peek
745359a494
Stub out Dispatcher#log_failsafe_exception method to please the test gods.
2008-04-15 18:04:12 -05:00
Joshua Peek
93641f30b7
Merge branch 'master' of git://github.com/stephencelis/rails
2008-04-14 15:01:47 -05:00
rick
750e3217e1
Merge commit 'stephencelis/master' into asset_shit
2008-04-13 20:27:22 -07:00
David Heinemeier Hansson
420c4b3d88
Added Rails.public_path to control where HTML and assets are expected to be loaded from (defaults to Rails.root + "/public") #11581 [nicksieger]
2008-04-13 17:33:27 -05:00
David Heinemeier Hansson
be7fd8168a
Merge branch 'master' of git://github.com/rails/rails
2008-04-13 17:28:14 -05:00
gbuesing
9620372a6d
Time#since behaves correctly when passed a Duration. Closes #11527 [kemiller]
2008-04-12 19:35:47 -05:00
Stephen Celis
89237fe07e
Scripts and styles with multiple dots in the filename should cache
2008-04-12 18:43:38 -05:00
gbuesing
f285b6119b
Add #getutc alias for DateTime#utc
2008-04-12 17:37:50 -05:00
gbuesing
0289b0e7df
Refactor TimeWithZone: don't send #since, #ago, #+, #-, #advance through method_missing
2008-04-12 17:31:29 -05:00
gbuesing
7e5aa6569b
TimeWithZone respects config.active_support.use_standard_json_time_format
2008-04-12 16:48:56 -05:00
Geoffrey Buesing
cfd56882af
rake time:zones:local finds correct base utc offset for zones in the Southern Hemisphere
2008-04-12 16:06:29 -05:00
David Heinemeier Hansson
342dcfe789
Merge branch 'master' of git://github.com/rails/rails
2008-04-12 10:26:29 -05:00
Michael Koziarski
60be4b09f5
Merge branch 'master' into custom_paths_for_resource_names
2008-04-12 12:40:51 +12:00
Michael Koziarski
063c393bf0
Allow alternative values for the 'new' and 'edit' actions in resourceful routes.
...
map.resource :schools, :as => 'escuelas', :path_names => { :new => 'nueva' }
Closes #11181 . [ivanvr]
2008-04-12 12:40:40 +12:00
Michael Koziarski
35904e2079
Merge branch 'master' of git@github.com:rails/rails
2008-04-12 12:08:45 +12:00
Michael Koziarski
6ed9e68e21
Allow freezing to specific releases with rake rails:freeze:edge RELEASE=1.2.0 per-release zip files are generated automatically by git-archive on dev.rubyonrails.org.
2008-04-12 12:08:26 +12:00
Jeremy Kemper
9a7ab8b05b
stub the instance method, there is no class method
2008-04-11 16:46:46 -07:00
Jeremy Kemper
13e7849785
Ruby 1.9 compat: workaround module_eval issue
2008-04-11 16:46:46 -07:00
David Dollar
4364c361b5
Now that we have gems:unpack and gems:build allowing for integration of
...
100% of your gems into vendor/ it would be nice to have the ability to
automatically unpack the full dependency tree of your specified gems.
This patch adds the rake task gems:unpack:dependencies to do this.
Usage:
gems:unpack:dependencies # unpack all dependencies
gems:unpack:dependencies GEM=foo # unpack all dependencies for gem foo
2008-04-11 18:25:11 -04:00
David Heinemeier Hansson
e89093aeb4
Fixed that formatted_polymorphic_route should be able to take the :format as part of a single hash or as the option hash (references #8741 )
2008-04-11 12:34:44 -05:00
David Heinemeier Hansson
b8bc92e619
Merge branch 'master' of git://github.com/rails/rails
2008-04-11 08:41:02 -05:00
Jeremy Kemper
f46fd6f2fc
Merge branch 'master' of git@github.com:rails/rails
2008-04-10 22:16:08 -07:00
Jeremy Kemper
4b17082107
rake rails:freeze:edge using http://dev.rubyonrails.org/archives/rails_edge.zip instead of Subversion
2008-04-10 22:15:50 -07:00
Michael Koziarski
2e74177d0b
Revert "Ensure that save on child object fails for invalid belongs_to association. Closes #11555 . [rubyruy]"
...
This reverts commit c67e985994 .
2008-04-11 16:04:11 +12:00
David Heinemeier Hansson
67022671bf
Testing commits
2008-04-10 22:09:13 -05:00
Rick Olson
ed99dda174
Change validates_uniqueness_of :case_sensitive option default back to true (from [9160]). Love your database columns, don't LOWER them. [rick]
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@9248 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2008-04-10 18:06:05 +00:00
Pratik Naik
c67e985994
Ensure that save on child object fails for invalid belongs_to association. Closes #11555 . [rubyruy]
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@9247 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2008-04-10 13:48:43 +00:00
Rick Olson
95fdc82fb2
Require rubygems if needed when initializing GemDependency instances
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@9245 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2008-04-09 16:24:32 +00:00
Rick Olson
8a5a9dcbf6
Add support for interleaving migrations by storing which migrations have run in the new schema_migrations table. Closes #11493 [jordi]
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@9244 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2008-04-09 16:20:15 +00:00
Rick Olson
78c2d9fc22
ActiveRecord::Base#sum defaults to 0 if no rows are returned. Closes #11550 [kamal]
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@9243 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2008-04-08 05:20:33 +00:00
Rick Olson
4d594cffcf
Automatically parse posted JSON content for Mime::JSON requests. [rick]
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@9242 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2008-04-08 05:05:54 +00:00
Rick Olson
0ff7a2d89f
add json_escape ERB util to escape html entities in json strings that are output in HTML pages. [rick]
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@9241 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2008-04-08 04:52:01 +00:00
Rick Olson
0bea3f8391
Don't require rails/gem_builder during rails initialization, it's only needed for the gems:build task. [rick]
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@9240 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2008-04-08 04:21:32 +00:00
Rick Olson
7e94cf7f4d
set ActiveSupport.escape_html_entities_in_json = false for new rails apps
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@9239 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2008-04-08 03:47:08 +00:00
Rick Olson
605196c448
Add config.active_support.escape_html_entities_in_json to allow disabling of html entity escaping. [rick]
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@9238 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2008-04-08 03:45:26 +00:00
Josh Peek
4b68982f64
Improve ActiveRecord::Base#table_name unit tests for nested classes. Closes #10289 . [scott_willson]
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@9237 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2008-04-07 19:44:37 +00:00
Josh Peek
2cdc613598
script/performance/profiler compatibility with the ruby-prof >= 0.5.0. Closes #9176 . [Catfish]
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@9236 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2008-04-07 19:29:09 +00:00
Pratik Naik
4f39382a2f
Ensure that respond_to? considers dynamic finder methods. Closes #11538 . [floehopper]
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@9235 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2008-04-06 22:26:15 +00:00
Josh Peek
917423d664
Provide a helper proxy to access helper methods from outside views. Closes #10839 [Josh Peek]
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@9234 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2008-04-06 18:42:34 +00:00
Pratik Naik
5b822aca4b
Split associations_test.rb into multiple files based on association type. [Pratik]
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@9233 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2008-04-06 03:01:09 +00:00
Pratik Naik
7ddc8f2e1b
Ensure that save on parent object fails for invalid has_one association. Closes #10518 . [Pratik]
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@9232 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2008-04-06 02:32:51 +00:00
Pratik Naik
9bc75fd007
Remove duplicate code from associations. [Pratik]
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@9231 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2008-04-06 02:18:42 +00:00
Pratik Naik
f6b12c11cd
Refactor HasManyThroughAssociation to inherit from HasManyAssociation. Association callbacks and <association>_ids= now work with hm:t. Closes #11516 [rubyruy]
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@9230 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2008-04-06 00:27:12 +00:00
Pratik Naik
15d88885ee
Ensure HABTM#create and HABTM#build do not load entire association. [Pratik]
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@9229 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2008-04-05 16:25:48 +00:00
Michael Koziarski
77730f7c9d
Avoid modifying the sendmail_settings hash when using the return path. Closes #7572 [billkirtley]
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@9228 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2008-04-05 11:28:15 +00:00
Pratik Naik
097c0d6166
Fix more typos and changelog
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@9227 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2008-04-05 11:18:05 +00:00
Pratik Naik
aa4af60aad
Improve documentation.
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@9226 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2008-04-05 03:52:58 +00:00
Josh Peek
08318b8bcd
Replaced callback method evaluation in AssociationCollection class to use ActiveSupport::Callbacks. Modified ActiveSupport::Callbacks::Callback#call to accept multiple arguments.
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@9225 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2008-04-04 20:26:42 +00:00
Michael Koziarski
36b8073ff5
Make HABTM#create behave the same as << with after_add callbacks. Closes #11374 [freels]
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@9224 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2008-04-04 14:37:22 +00:00
Michael Koziarski
50538fb524
Don't double include DISTINCT when the user has already specified it. Closes #11502 [kenneth.kalmer]
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@9223 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2008-04-04 12:06:22 +00:00
Michael Koziarski
295587f0ab
Tiny change to allow AR based creation of TIME columns in sqlite. Closes #11465 [h-lame]
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@9222 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2008-04-04 11:45:08 +00:00
Geoff Buesing
49f2e6f8d4
Time #yesterday and #tomorrow behave correctly crossing DST boundary. Closes #7399 [sblackstone]
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@9221 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2008-04-04 03:29:30 +00:00
Jeremy Kemper
cfe42ba1b1
Update fcgi dispatcher test cases. Closes #11471 [guillaume]
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@9220 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2008-04-03 20:00:33 +00:00
Jeremy Kemper
940cf0cacd
Bah, don't test TMail in AM
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@9219 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2008-04-03 18:32:10 +00:00
Jeremy Kemper
5c17a74d59
Ruby 1.9 compat: compare with same encoding
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@9218 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2008-04-03 17:28:05 +00:00
Jeremy Kemper
c9aaad795d
Ruby 1.9 compat: ascii encoding for quoted-printable regexps
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@9217 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2008-04-03 17:27:55 +00:00
Rick Olson
8ff9e9365d
missed an added file
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@9216 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2008-04-02 21:53:21 +00:00
Rick Olson
7d2316604a
Flesh out rake gems:unpack to unpack all gems, and add rake gems:build for native extensions. Closes #11513 [ddollar]
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@9215 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2008-04-02 17:48:30 +00:00
Geoff Buesing
2c6f1d4396
TimeWithZone: Adding tests for dst and leap day edge cases when advancing time
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@9213 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2008-04-02 14:15:30 +00:00
Pratik Naik
1e087fd3fd
Ensure RJS redirect_to doesn't html-escapes string argument. Closes #8546
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@9212 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2008-04-02 12:48:59 +00:00
Pratik Naik
6a36d96aa2
Fix that config.to_prepare dependency error. Closes #10520 [akaspick, Pratik]
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@9211 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2008-04-02 12:48:10 +00:00
Pratik Naik
3b603bbc93
Revert [9209] Use Hash#except
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@9210 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2008-04-02 12:47:52 +00:00
Pratik Naik
adaed1ebcb
Adding Hash#without Closes #7369 [eventualbuddha]
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@9209 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2008-04-02 11:45:03 +00:00
Geoff Buesing
f4dc834976
TimeWithZone#method_missing: send to utc to advance with dst correctness, otherwise send to time. Adding tests for time calculations methods
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@9208 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2008-04-02 06:56:44 +00:00
Rick Olson
c4ccca1f84
spell check
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@9205 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2008-04-01 20:55:45 +00:00
Rick Olson
e0402fe032
Add config.active_support for future configuration options. Also, add more new Rails 3 config settings to new_rails_defaults.rb [rick]
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@9204 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2008-04-01 20:35:56 +00:00
Rick Olson
1eb57a6870
Add config.active_support.use_standard_json_time_format setting so that Times and Dates export to ISO 8601 dates. [rick]
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@9203 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2008-04-01 20:25:26 +00:00
Rick Olson
d450ac4459
Tweak ActiveRecord::Base#to_json to include a root value in the returned hash: {post: {title: ...}} [rick]
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@9202 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2008-04-01 20:09:45 +00:00
David Heinemeier Hansson
6a74360f97
Use class << self
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@9201 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2008-04-01 19:16:55 +00:00
Rick Olson
e223216e9a
Add efficient #include? to AssociationCollection (for has_many/has_many :through/habtm). [stopdropandrew]
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@9200 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2008-04-01 18:27:22 +00:00
David Heinemeier Hansson
4e07037afa
gems should be specified before plugins
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@9199 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2008-04-01 17:15:31 +00:00
David Heinemeier Hansson
8f8f822fa6
Added examples for config.gem
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@9198 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2008-04-01 17:13:05 +00:00
Jeremy Kemper
8f46ead1e9
Improving railties test coverage. Closes #11496 [miloops]
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@9197 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2008-04-01 16:54:30 +00:00
Jeremy Kemper
0c0c9fa863
Partial updates off by default
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@9196 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2008-04-01 15:48:46 +00:00
Jeremy Kemper
41ac6c553f
Ruby 1.9 compat: toplevel AS reference within BasicObject
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@9195 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2008-04-01 07:39:14 +00:00
Jeremy Kemper
30fa377f33
Ruby 1.9 compat: encoding and multibyte test fixes
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@9194 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2008-04-01 07:39:04 +00:00
Jeremy Kemper
300c927b6c
Ruby 1.9 compat: force encoding for binary comparison tests
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@9193 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2008-04-01 06:58:52 +00:00
Jeremy Kemper
ba8e0a846f
Ruby 1.9 compat: work around YAML serialization error exposed by validations tests
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@9192 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2008-04-01 06:46:40 +00:00
Jeremy Kemper
c3df9bfad2
Ruby 1.9 compat: delete DEFAULTS key from Hash not Omap array
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@9191 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2008-04-01 06:33:16 +00:00
Jeremy Kemper
ecdddc4de5
Ruby 1.9 compat: proc arity
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@9190 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2008-04-01 06:11:56 +00:00
Jeremy Kemper
a2ad945627
style & whitespace
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@9189 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2008-04-01 06:11:48 +00:00
Jeremy Kemper
09ca8a6701
Ruby 1.9 compat: don't confuse with headers method call
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@9188 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2008-04-01 06:11:40 +00:00
Jeremy Kemper
b79f7d127a
Ruby 1.9: no args is 0 arity, not -1 as in 1.8
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@9187 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2008-04-01 06:11:31 +00:00
Jeremy Kemper
f33963aa3a
Ruby 1.9 compat: anonymous class name is nil not '' now
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@9186 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2008-04-01 06:11:22 +00:00
Jeremy Kemper
2916686c95
Ruby 1.9 compat: anonymous class name is nil not '' now
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@9185 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2008-04-01 05:38:29 +00:00
Jeremy Kemper
767be30e61
force_encoding to ascii-8bit instead of nil
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@9184 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2008-04-01 05:32:11 +00:00
Jeremy Kemper
25eeea7197
PostgreSQL: use create_ and drop_database for rake tasks. Closes #9045 [ez, nicksieger]
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@9183 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2008-04-01 05:01:33 +00:00
Jeremy Kemper
e4e3df8ef8
PostgreSQL: create_ and drop_database support. Closes #9042 .
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@9182 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2008-04-01 05:01:10 +00:00
Pratik Naik
dc1166d12b
Add Rails.logger, Rails.root, Rails.env and Rails.cache shortcuts for RAILS_* constants
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@9180 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2008-04-01 02:09:52 +00:00
Pratik Naik
c2ea287447
Remove unnecessary arguments. References #11491 .
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@9179 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2008-04-01 02:09:15 +00:00
Jeremy Kemper
dd3c0ae95c
Missed adds. References #11491 .
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@9178 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2008-04-01 00:56:59 +00:00
Jeremy Kemper
9cc478a254
Support render :partial => collection of heterogeneous elements. Closes #11491 .
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@9177 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2008-04-01 00:50:09 +00:00
Jeremy Kemper
2681d55e40
Update generator tests. Closes #11487 [thechrisoshow]
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@9176 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2008-04-01 00:29:24 +00:00
Jeremy Kemper
0a2e980ddd
Fix migration test when run in GMT zone. Closes #11477 [thechrisoshow]
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@9175 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2008-04-01 00:28:40 +00:00
David Heinemeier Hansson
d950addbfd
Move it around a bit
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@9174 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2008-04-01 00:13:39 +00:00
David Heinemeier Hansson
87535bd373
Splitting them up first
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@9173 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2008-04-01 00:05:48 +00:00
David Heinemeier Hansson
a5445fd9c5
Deprecate some more legacy
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@9172 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2008-03-31 23:45:48 +00:00
David Heinemeier Hansson
9ddc6143e0
Something more to work with
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@9171 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2008-03-31 23:40:34 +00:00
David Heinemeier Hansson
c4be0dbca9
Fixed charset/collation for rake db:create ( closes #11331 ) [matt]
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@9170 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2008-03-31 21:16:17 +00:00
Pratik Naik
92cd8811aa
Ensure that validates_uniqueness_of works with with_scope. Closes #9235 . [nik.wakelin, cavalle]
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@9168 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2008-03-31 12:57:47 +00:00
Rick Olson
cc2d6a0b93
Allow files in plugins to be reloaded like the rest of the application. [rick]
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@9167 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2008-03-31 06:53:44 +00:00
Jeremy Kemper
a8ac5300e6
Bump bundled tmail to r242
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@9166 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2008-03-31 05:31:47 +00:00
Jeremy Kemper
af74077544
Ruby 1.9 compat: mark utf-8 encoding.
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@9165 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2008-03-31 05:31:37 +00:00
Jeremy Kemper
be36455181
Ruby 1.9 compat: use Array() instead of #to_a.
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@9164 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2008-03-31 05:31:29 +00:00
Jeremy Kemper
f6484e63c1
rename config/initializers/new_in_rails_3.rb to new_rails_defaults.rb
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@9163 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2008-03-31 04:59:23 +00:00
Jeremy Kemper
df0d56c1f6
Force timestamp update
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@9162 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2008-03-31 03:57:25 +00:00
Jeremy Kemper
047db11299
Fine, warn. Just don't recurse to death in cc.rb
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@9161 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2008-03-31 02:18:17 +00:00
Jeremy Kemper
c52771e7a0
Fix case-sensitive validates_uniqueness_of. Closes #11366 [miloops]
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@9160 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2008-03-31 01:50:07 +00:00
Jeremy Kemper
97019f9f5a
Partial updates play nice with updated_at/on timestamps
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@9159 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2008-03-31 01:49:57 +00:00
Jeremy Kemper
3aaf60def8
Add :message option to validates_numericality_of. Closes #11456 [miloops, mdempfle]
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@9158 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2008-03-31 01:49:31 +00:00
Jeremy Kemper
6b9448cdd2
Partial updates include only unsaved attributes. Off by default; set YourClass.partial_updates = true to enable.
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@9157 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2008-03-31 01:10:04 +00:00
Jeremy Kemper
2cf72ad250
Add query methods for superclass_delegating_reader
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@9156 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2008-03-31 01:09:39 +00:00
Jeremy Kemper
181378d1e9
Always alias DateTime#to_s to #to_default_s
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@9155 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2008-03-31 01:09:29 +00:00
Jeremy Kemper
ade1e3defd
require fileutils
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@9154 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2008-03-31 01:09:19 +00:00
Geoff Buesing
2ccfcc42b0
TZInfo: Removing unneeded TimezoneProxy class
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@9153 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2008-03-30 23:49:52 +00:00
Geoff Buesing
9c124a98b3
TZInfo: Removing unneeded TimezoneIndexDefinition, since we're not including Indexes::Timezones
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@9152 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2008-03-30 23:27:17 +00:00
Jeremy Kemper
c3ce27fbaf
Handle exit, reload, and restart immediately if not processing a request. References #11471 [guillaume, Jeremy Kemper]
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@9151 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2008-03-30 23:07:52 +00:00
Geoff Buesing
458fd10483
Removing unnecessary uses_tzinfo helper from tests, given that TZInfo is now bundled
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@9150 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2008-03-30 23:01:06 +00:00
Geoff Buesing
d4493bc562
Bundling abbreviated version of TZInfo gem 0.3.8: only the classes and zone definitions required to support Rails time zone features are included. If a recent version of the full TZInfo gem is installed, this will take precedence over the bundled version
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@9149 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2008-03-30 22:24:35 +00:00
Rick Olson
c2ce69860a
whoops, typo in the CHANGELOG
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@9148 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2008-03-30 18:22:31 +00:00
Jeremy Kemper
a5b7f131ed
Ruby 1.9: mark failing assertion
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@9147 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2008-03-30 06:17:45 +00:00
Jeremy Kemper
373de28029
Ruby 1.9 compat. Trailing whitespace.
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@9146 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2008-03-30 06:17:37 +00:00
Jeremy Kemper
fa6fcb45e2
Don't shadow attrs var
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@9145 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2008-03-30 06:17:29 +00:00
Jeremy Kemper
316906cbbb
Merge in latest tmail trunk r241
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@9144 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2008-03-30 05:05:19 +00:00
Jeremy Kemper
f66bbf5ed0
Don't need to explicitly pass the same params to super. Remove trailing whitespace.
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@9143 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2008-03-30 05:02:25 +00:00
Josh Peek
bf3c217238
Ruby 1.9 compat: Suppress Benchmark.realtime method redefined warning.
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@9142 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2008-03-30 03:04:41 +00:00
Rick Olson
65b4702c4f
Small tweak to allow plugins to specify gem dependencies. [rick]
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@9141 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2008-03-30 02:35:08 +00:00
Rick Olson
088ef182e3
Added config.gem for specifying which gems are required by the application, as well as rake tasks for installing and freezing gems. [rick]
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@9140 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2008-03-30 02:17:28 +00:00
Jeremy Kemper
81286f8587
Dirty typecasts attribute values before comparison, if possible. Closes #11464 [Russell Norris, mroch]
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@9139 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2008-03-29 22:19:26 +00:00
Josh Peek
eece9b4e8a
Force json string encoding to ASCII-8BIT before unpacking for Ruby 1.9.
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@9138 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2008-03-29 21:48:08 +00:00
Jeremy Kemper
6ef3bc3d02
Play nice with 1.9's DateTime#to_s
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@9137 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2008-03-29 21:23:10 +00:00
Josh Peek
37a004ded4
Ensure threads finish running for time zone thread safety test.
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@9136 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2008-03-29 20:50:09 +00:00
David Heinemeier Hansson
3e73278020
Removed the default .htaccess configuration as there are so many good deployment options now (kept it as an example in README) [DHH]
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@9134 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2008-03-29 18:45:39 +00:00
Jeremy Kemper
e8170805df
Generated tests rely on test dir in load path rather than File.dirname shenanigans. ruby -Itest test/unit/foo_test.rb to run a test by hand (that's a capital I as in Island).
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@9133 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2008-03-29 18:41:10 +00:00
David Heinemeier Hansson
827b529459
Update welcome screen with revised instructions and removal of dead links
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@9132 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2008-03-29 18:37:14 +00:00
David Heinemeier Hansson
968e022fc6
Space at the bottom feels better
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@9131 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2008-03-29 18:02:40 +00:00
David Heinemeier Hansson
9ffbbd08bb
Removed outdated scaffold from template
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@9130 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2008-03-29 18:01:49 +00:00
David Heinemeier Hansson
f34d57e2d2
Fixed that validates_size_of :within works in associations ( closes #11295 , #10019 ) [cavalle]
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@9129 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2008-03-29 17:53:44 +00:00
Jeremy Kemper
3748d7a0f2
Revert spurious commit from [9126]
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@9128 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2008-03-29 00:26:15 +00:00
Jeremy Kemper
bbf738f269
Track changes to unsaved attributes
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@9127 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2008-03-29 00:04:27 +00:00
David Heinemeier Hansson
3704f4ba2e
Fix new migration versions
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@9126 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2008-03-28 22:14:04 +00:00
Jeremy Kemper
a61b63d420
Avoid remote_ip spoofing
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@9124 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2008-03-28 21:38:01 +00:00
Jeremy Kemper
18049864cb
Inspect options hashes in RenderError message so it's actually readable. Closes #11435 [court3nay]
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@9123 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2008-03-28 21:23:28 +00:00
David Heinemeier Hansson
c00de99f69
Switched to UTC-timebased version numbers for migrations and the schema. This will as good as eliminate the problem of multiple migrations getting the same version assigned in different branches. Also added rake db:migrate:up/down to apply individual migrations that may need to be run when you merge branches ( closes #11458 ) [jbarnette]
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@9122 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2008-03-28 21:21:01 +00:00
Jeremy Kemper
ad8df03f9c
Add #clone. Closes #7352 [Ryan Daigle, thechrisoshow]
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@9121 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2008-03-28 21:17:38 +00:00
Jeremy Kemper
5c0656c9ee
Fix layouts in symlinked paths. Closes #9136 [court3nay, caio]
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@9120 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2008-03-28 20:54:26 +00:00
Jeremy Kemper
6efee90bf2
Missing :js template falls back to :html, so you don't have to explicitly specify template format everywhere, breaking old code
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@9119 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2008-03-28 20:21:52 +00:00
Jeremy Kemper
6b5fe9c644
Fix some mistaken dependencies among AR unit tests. Closes #11425 [thechrisoshow]
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@9118 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2008-03-28 20:21:20 +00:00
David Heinemeier Hansson
4e69ed0656
Add missing file
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@9117 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2008-03-28 20:17:21 +00:00
David Heinemeier Hansson
b7aa223554
Update doc ( closes #11402 )
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@9116 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2008-03-28 20:03:28 +00:00
David Heinemeier Hansson
db3a60eb92
Added support for regexp flags like ignoring case in the :requirements part of routes declarations ( closes #11421 ) [NeilW]
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@9115 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2008-03-28 20:01:21 +00:00
David Heinemeier Hansson
9300ebd86f
Fixed that to_param should be used and honored instead of hardcoding the id ( closes #11406 ) [gspiers]
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@9114 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2008-03-28 19:58:46 +00:00
David Heinemeier Hansson
388e5d3fac
Fixed that ActionController::Base#read_multipart would fail if boundary was exactly 10240 bytes ( closes #10886 ) [ariejan]
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@9113 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2008-03-28 19:55:31 +00:00
David Heinemeier Hansson
4aca503d0e
Fixed that no gems installed would cause error ( closes #11459 ) [thechrisoshow]
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@9112 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2008-03-28 19:52:02 +00:00
David Heinemeier Hansson
c57254d449
Fixed HTML::Tokenizer (used in sanitize helper) didnt handle unclosed CDATA tags ( closes #10071 ) [esad, packagethief]
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@9111 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2008-03-28 19:45:32 +00:00
David Heinemeier Hansson
bdd88810c1
Fixed that has_many :through would ignore the hash conditions ( closes #11447 ) [miloops]
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@9110 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2008-03-28 16:13:57 +00:00
Pratik Naik
533da24bbc
Make sure ActiveRecord tests can run individually. Closes #11425 [thechrisoshow, h-lame]
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@9109 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2008-03-28 11:55:01 +00:00
Geoff Buesing
c62db052a0
config.time_zone and TimeWithZone#marshal_load accept tzinfo/Olson identifiers
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@9108 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2008-03-28 04:35:48 +00:00
Geoff Buesing
59183eec6f
Time.zone= accepts TZInfo::Timezone instances and Olson identifiers; wraps result in TimeZone instance
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@9107 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2008-03-28 04:06:47 +00:00
Geoff Buesing
129d94477b
TimeWithZone time conversions don't need to be wrapped in TimeOrDateTime, because TZInfo does this internally
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@9106 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2008-03-28 02:10:36 +00:00
Geoff Buesing
e4645e00b7
TimeWithZone#usec returns 0 instead of error when DateTime is wrapped
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@9105 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2008-03-28 01:57:41 +00:00
Geoff Buesing
480a7581d4
Rails::Initializer#initialize_time_zone raises an error if value assigned to config.time_zone is not recognized. Rake time zone tasks only require ActiveSupport instead of entire environment
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@9104 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2008-03-28 01:45:04 +00:00
David Heinemeier Hansson
d8823d6fb7
Stop adding the antiquated test/mocks/* directories and only add them to the path if theyre still there for legacy reasons [DHH]
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@9102 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2008-03-27 22:33:50 +00:00
David Heinemeier Hansson
8301ce4d0b
Added that gems can now be plugins if they include rails/init.rb ( closes #11444 ) [jbarnette]
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@9101 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2008-03-27 18:37:53 +00:00
David Heinemeier Hansson
6080943950
Missing test data
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@9100 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2008-03-27 17:54:43 +00:00
David Heinemeier Hansson
5c0d38f674
Fixed that a return-path header would be ignored ( closes #7572 ) [joost]
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@9099 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2008-03-27 17:54:02 +00:00
David Heinemeier Hansson
f5b991d76d
Added Plugin#about method to programmatically access the about.yml in a plugin ( closes #10979 ) [lazyatom]
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@9098 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2008-03-27 17:47:51 +00:00
David Heinemeier Hansson
35d3ede974
New applications should use UTC as the default time zone
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@9097 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2008-03-26 21:01:30 +00:00
Rick Olson
c366515abd
Fix issue where the :uniq option of a has_many :through association is ignored when find(:all) is called. Closes #9407 [cavalle]
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@9096 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2008-03-26 15:40:57 +00:00
Rick Olson
1648208ab0
Fix duplicate table alias error when including an association with a has_many :through association on the same join table. Closes #7310 [cavalle]
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@9095 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2008-03-26 15:36:17 +00:00
Rick Olson
628ffad98b
More efficient association preloading code that compacts a through_records array in a central location. Closes #11427 [danger]
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@9094 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2008-03-26 15:26:59 +00:00
Pratik Naik
ca9413674e
Improve documentation.
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@9093 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2008-03-26 12:27:52 +00:00
Michael Koziarski
5c47ceb30b
Typo fix in documentation from [9090] References #11422
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@9092 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2008-03-26 02:44:16 +00:00
Michael Koziarski
dcbdd004fc
Standardise the implementation of the extensions to BigDecimal. Closes #10608 [mikong]
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@9091 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2008-03-26 02:43:38 +00:00
David Heinemeier Hansson
c10b2255b5
Fixed that ActiveRecord#Base.find_or_create/initialize would not honor attr_protected/accessible when used with a hash ( closes #11422 ) [miloops]
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@9090 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2008-03-25 23:56:48 +00:00
Jeremy Kemper
4942e5b1cb
Whitespace + formatting
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@9089 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2008-03-25 21:27:57 +00:00
David Heinemeier Hansson
b0bfcca16e
Fixed that FormHelper#radio_button would produce invalid ids ( closes #11298 ) [harlancrystal]
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@9088 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2008-03-24 21:32:50 +00:00
David Heinemeier Hansson
123f5a357d
Added :confirm option to submit_tag ( closes #11415 ) [miloops]
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@9087 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2008-03-24 21:24:40 +00:00
David Heinemeier Hansson
0e62c773f6
Fixed NumberHelper#number_with_precision to properly round in a way that works equally on Mac, Windows, Linux ( closes #11409 , #8275 , #10090 , #8027 ) [zhangyuanyi]
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@9086 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2008-03-24 21:12:55 +00:00
David Heinemeier Hansson
c6f2af5c31
Added ActiveRecord#Base.all/first/last as aliases for find(:all/:first/:last) ( closes #11413 ) [nkallen, thechrisoshow]
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@9085 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2008-03-24 19:59:22 +00:00
Rick Olson
081ddb6f24
Merge the has_finder gem, renamed as 'named_scope'. Closes #11404 [nkallen]
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@9084 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2008-03-24 02:50:02 +00:00
Rick Olson
5bf4cbbdb7
Allow the #simple_format text_helper to take an html_options hash for each paragraph. Closes #2448 [Francois Beausoleil, thechrisoshow]
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@9083 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2008-03-24 02:29:30 +00:00
Jeremy Kemper
0ff031992f
Fix merging blank conditions. Closes #10764 [mcmire, cavalle]
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@9082 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2008-03-23 05:00:25 +00:00
Rick Olson
e1790efb85
Ensure that TimeWithZone#to_yaml works when passed a YAML::Emitter. [rick]
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@9081 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2008-03-23 04:44:50 +00:00
Rick Olson
0381398708
Fix regression from filter refactoring where re-adding a skipped filter resulted in it being called twice. [rick]
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@9080 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2008-03-23 01:48:17 +00:00
Geoff Buesing
29e3316178
Ensure correct TimeWithZone#to_date
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@9079 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2008-03-22 18:43:36 +00:00
Geoff Buesing
ea285c2f78
Correct grammar in config.time_zone description in environment.rb
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@9078 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2008-03-22 05:27:07 +00:00
David Heinemeier Hansson
3e556d3dbc
Use the more modern error_messages from the form object rather than error_messages_for
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@9077 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2008-03-22 04:47:53 +00:00
Geoff Buesing
1ec8a7f4e0
Added config.time_zone = 'UTC' as a commented-out option in the default environment.rb
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@9076 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2008-03-22 02:23:09 +00:00
Jeremy Kemper
5c1be2812d
has_one :through supports :source_type. Fix up some tests. References #4756 .
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@9075 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2008-03-22 02:20:37 +00:00
Geoff Buesing
f921a96e85
Adding rake tasks time:zones:all, time:zones:us and time:zones:local for finding time zone names for config.time_zone option
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@9074 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2008-03-22 01:59:09 +00:00
Jeremy Kemper
98d87f38fc
Fix schema.rb some more. sponsors.sponsorable_type should be a string. References #4756 .
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@9073 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2008-03-21 23:15:21 +00:00
Jeremy Kemper
36baabe24c
Fix schema.rb. Please to be testing on more than just MySQL! References #9067 .
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@9072 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2008-03-21 23:10:42 +00:00
Geoff Buesing
f371f29265
Make TimeWithZone work with tzinfo 0.2.x: use TZInfo::Timezone#zone_identifier alias for #abbreviation, silence warnings on tests. Raise LoadError when TZInfo version is < 0.2 by sniffing for TZInfo::TimeOrDateTime constant. Move all tzinfo-dependent TimeZone tests into uses_tzinfo block
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@9071 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2008-03-21 22:48:00 +00:00
Jeremy Kemper
f2840f508d
Fix an edge case with extra periods in Routing.normalize_paths. Closes #11337 [cavalle, veejar]
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@9069 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2008-03-21 22:44:04 +00:00
Rick Olson
c23c9bd11b
Allow association scoping for built/created records if :conditions is specified as a hash. Closes #11393 [miloops]
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@9068 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2008-03-21 18:21:56 +00:00
Rick Olson
273b21faa9
Add has_one :through support, finally. Closes #4756 [thechrisoshow]
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@9067 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2008-03-21 18:09:03 +00:00
Jeremy Kemper
d8f76e66a1
Missed adds. References #10350 .
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@9066 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2008-03-20 16:51:06 +00:00
Jeremy Kemper
bd940d98bd
Re-added ActionView::Helpers::register_javascript/stylesheet_expansion to make it easier for plugin developers to inject multiple assets. Closes #10350 .
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@9065 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2008-03-20 16:26:04 +00:00
David Heinemeier Hansson
54213dadfd
Docfixes ( closes #11356 , #11172 , #10523 )
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@9064 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2008-03-20 02:15:29 +00:00
Jeremy Kemper
e87d3e3335
Revert [9106]. References #10350 .
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@9063 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2008-03-19 19:56:07 +00:00
Jeremy Kemper
eb837b52e3
assert_response, don't cry if @exception isn't available in the template
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@9059 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2008-03-18 23:37:55 +00:00
Jeremy Kemper
dfa6888311
Migrations: create_table supports primary_key_prefix_type. Closes #10314 .
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@9056 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2008-03-18 18:23:14 +00:00
Jeremy Kemper
856a4dcf12
Refactor filters to use Active Support callbacks. Closes #11235 .
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@9055 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2008-03-18 17:56:05 +00:00
David Heinemeier Hansson
9af9fc3da1
sshpublisher needs to be explicitly required now, apparently
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@9054 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2008-03-18 04:46:51 +00:00
David Heinemeier Hansson
db08329946
Fixed that polymorphic routes would modify the input array ( closes #11363 ) [thomas.lee]
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@9053 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2008-03-17 23:45:42 +00:00
David Heinemeier Hansson
3c0fd445c0
Added :format option to NumberHelper#number_to_currency to enable better localization support #11149 [lylo]
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@9052 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2008-03-17 22:08:25 +00:00
David Heinemeier Hansson
75d98db73d
Only log if theres a logger
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@9051 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2008-03-17 22:07:54 +00:00
David Heinemeier Hansson
fbf41c72a9
Added logging for dependency load errors with fixtures ( closes #11056 ) [stuthulhu]
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@9050 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2008-03-17 21:48:28 +00:00
David Heinemeier Hansson
d07d6e900c
Added support for installing plugins hosted at git repositories ( closes #11294 ) [danger]
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@9049 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2008-03-17 21:44:16 +00:00
Geoff Buesing
54ccdd3343
Time, DateTime and TimeWithZone #in_time_zone defaults to Time.zone. Removing now unneeded #in_current_time_zone. ActiveRecord time zone aware attributes updated to use #in_time_zone
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@9047 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2008-03-17 05:50:13 +00:00
Geoff Buesing
fe7c68ee5d
TZInfo caches Timezone instances in its own internal hash cache, so TimeZone::MAPPING doesn't need to cache them as well
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@9046 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2008-03-17 05:14:26 +00:00
Geoff Buesing
2366fdbdb1
Adding TimeZone#parse
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@9045 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2008-03-17 05:07:50 +00:00
David Heinemeier Hansson
ff8b9e6b08
Fixed that atom_feed shouldnt require a schema_date since most people just dont care and the value tends to be of no significance anyway (references #10672 ) [DHH]
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@9044 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2008-03-17 04:46:33 +00:00
David Heinemeier Hansson
9e4558671c
Ensure that you can still do expressions in calculations ( closes #11355 ) [nbugajski/cavelle]
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@9043 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2008-03-17 04:02:34 +00:00
Geoff Buesing
b132413885
Adding TimeZone#at and DateTime#to_f
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@9042 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2008-03-17 03:45:32 +00:00
Geoff Buesing
895487c122
TimeWithZone responds to Ruby 1.9 weekday-named query methods
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@9041 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2008-03-17 02:54:23 +00:00
Geoff Buesing
77ee522bf6
TimeWithZone caches TZInfo::TimezonePeriod used for time conversion so that it can be reused, and enforces DST rules correctly when instance is created from a local time
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@9040 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2008-03-17 02:40:28 +00:00
David Heinemeier Hansson
1b41178a83
Docfix ( closes #11230 ) [Henrik N]
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@9035 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2008-03-15 20:08:51 +00:00
David Heinemeier Hansson
3ecde39968
Docfix ( closes #11226 ) [mikong]
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@9034 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2008-03-15 20:08:05 +00:00
David Heinemeier Hansson
7145c29be3
Docfix ( closes #11249 ) [juanjo.bazan]
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@9033 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2008-03-15 20:03:32 +00:00
David Heinemeier Hansson
b2dd357d22
Fixed that cache fetch method would cause nil exception when called with no options ( closes #11253 ) [remy]
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@9032 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2008-03-15 20:02:46 +00:00
David Heinemeier Hansson
a02c6070f0
Docfix ( closes #11263 ) [Irfy]
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@9031 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2008-03-15 20:00:41 +00:00
David Heinemeier Hansson
5f5822af37
Fixed that TextHelper#excerpt would include one character too many ( closes #11268 ) [Irfy]
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@9030 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2008-03-15 19:59:34 +00:00
David Heinemeier Hansson
d0bc724786
Docfix ( closes #11281 ) [jlindley]
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@9029 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2008-03-15 19:54:02 +00:00
David Heinemeier Hansson
5b58bc1963
Removed dead styles ( closes #11353 ) [boone]
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@9028 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2008-03-15 19:33:13 +00:00
Pratik Naik
4036fcc5c4
Handle template error gracefully when line number cannot be derived. Closes #11327 [Nex3]
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@9027 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2008-03-15 18:42:53 +00:00
Jeremy Kemper
d7f84f61a2
Remove unused to_date_tag. Closes #11237 [danger]
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@9024 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2008-03-13 19:18:45 +00:00
David Heinemeier Hansson
36a1418720
Docfix ( closes #11309 ) [thechrisoshow]
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@9023 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2008-03-13 18:45:54 +00:00
David Heinemeier Hansson
2c6e616b90
Fixed that scoped joins would not always be respected ( closes #6821 ) [Theory/Danger]
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@9022 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2008-03-13 18:41:42 +00:00
Pratik Naik
58c30f6135
Move tests from action_view_test.rb to template_finder_test.rb so that they get run by default take task. [Pratik]
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@9021 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2008-03-13 11:52:53 +00:00
Rick Olson
1e0ac3a673
Fix more obscure nested parameter hash parsing bug. Closes #10797 [thomas.lee]
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@9020 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2008-03-13 03:22:25 +00:00
Rick Olson
7750afc4c1
Ensure that ActiveRecord::Calculations disambiguates field names with the table name. Closes #11027 [cavalle]
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@9018 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2008-03-13 03:06:51 +00:00
David Heinemeier Hansson
dd665ff967
Fixed that script/generate would not look for plugin generators in plugin_paths ( closes #11000 ) [glv]
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@9017 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2008-03-13 02:47:26 +00:00
David Heinemeier Hansson
e915379a10
Added ActionView::Helpers::register_javascript/stylesheet_expansion to make it easier for plugin developers to inject multiple assets ( closes #10350 ) [lotswholetime]
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@9016 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2008-03-13 02:31:45 +00:00
David Heinemeier Hansson
9d4fa7c4a7
Applied the faster squish version ( closes #11123 ) [jordi]
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@9015 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2008-03-13 02:25:10 +00:00
David Heinemeier Hansson
bcb47a843b
Added add/remove_timestamps to the schema statements for adding the created_at/updated_at columns on existing tables ( closes #11129 ) [jramirez]
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@9014 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2008-03-13 02:17:04 +00:00
David Heinemeier Hansson
13ab55f737
Fixed that BufferedLogger should create its own directory if one doesnt already exist ( closes #11285 ) [lotswholetime]
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@9013 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2008-03-13 01:54:34 +00:00
David Heinemeier Hansson
d5a4d5abb4
Added ActiveRecord::Base.find(:last) ( closes #11338 ) [miloops]
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@9012 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2008-03-12 21:26:02 +00:00
Pratik Naik
8cc28daad6
Add warning in documentation for increment!, decrement! and toggle! methods. Closes #11098 [DefV]
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@9011 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2008-03-11 12:05:06 +00:00
Rick Olson
3a17ea9031
Fix nested parameter hash parsing bug. #10797 [thomas.lee]
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@9010 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2008-03-11 07:46:39 +00:00
Geoff Buesing
5483de0cc3
Fix Numeric time tests broken by DST change by anchoring them to fixed times instead of Time.now. Anchor TimeZone#now DST test to time specified with Time.at instead of Time.local to work around platform differences with Time.local and DST representation
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@9009 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2008-03-11 07:19:36 +00:00
Geoff Buesing
3af5b27839
Removing unneeded #change_time_zone method from Time, DateTime and TimeWithZone
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@9008 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2008-03-11 06:23:41 +00:00
Geoff Buesing
ba91fddc44
TimeZone #local and #now correctly enforce DST rules
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@9007 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2008-03-11 05:39:13 +00:00
Geoff Buesing
52b57c662c
TimeWithZone instances correctly enforce DST rules. Adding TimeZone#period_for_utc
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@9006 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2008-03-11 04:26:20 +00:00
Pratik Naik
3d2177df26
Fix database rake tasks to work with charset/collation and show proper error messages on failure. Closes #11301 [matt]
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@9004 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2008-03-10 11:42:01 +00:00
Geoff Buesing
8e21ec36cf
test_native_types expects DateTime.local_offset instead of DateTime.now.offset; fixes test breakage due to dst transition
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@9003 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2008-03-10 06:48:15 +00:00
Geoff Buesing
f56c25d7b4
test_time_with_datetime_fallback expects DateTime.local_offset instead of DateTime.now.offset
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@9002 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2008-03-10 03:37:38 +00:00
Pratik Naik
cff3ecc2ae
Allow using named routes in ActionController::TestCase before any request has been made. Closes #11273 [alloy]
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8992 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2008-03-08 12:56:41 +00:00
Pratik Naik
e91d7ed53d
Update URL in script/generate usage. Closes #11220 [neshmi]
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8991 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2008-03-08 12:55:57 +00:00
David Heinemeier Hansson
363a6f5de6
Fixed that sweepers defined by cache_sweeper will be added regardless of the perform_caching setting. Instead, control whether the sweeper should be run with the perform_caching setting. This makes testing easier when you want to turn perform_caching on/off [DHH]
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8990 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2008-03-08 01:05:53 +00:00
Pratik Naik
e117350037
Add :readonly option to HasManyThrough associations. Closes #11156 [miloops]
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8989 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2008-03-07 11:45:07 +00:00
Pratik Naik
8a351648ab
Fixed typos in ActiveSupport::Callbacks documentation. Closes #11254
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8988 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2008-03-07 11:17:38 +00:00
Pratik Naik
011e469410
Make MimeResponds::Responder#any work without explicit types. Closes #11140 [jaw6]
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8987 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2008-03-07 11:17:05 +00:00
Rick Olson
867063134f
Better error message for type conflicts when parsing params. Closes #7962 [spicycode, matt]
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8986 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2008-03-07 01:23:12 +00:00
Pratik Naik
d7627361d3
Remove unused ActionController::Base.template_class. Closes #10787
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8985 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2008-03-05 12:12:17 +00:00
Pratik Naik
5932357f19
Docs for ActiveSupport::Callbacks. Closes #11254 [ernesto.jimenez]
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8984 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2008-03-05 10:53:34 +00:00
Pratik Naik
b1f6bb90b9
Documentation for the drop_receiving_element helpers :onDrop callback. Closes #11158 [thechrisoshow]
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8983 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2008-03-05 10:53:04 +00:00
Pratik Naik
be62024c25
Documenation for has_one/has_many nested resource options. Closes #11195 [miloops]
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8982 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2008-03-05 10:52:22 +00:00
Pratik Naik
a96272a0c5
Moved template handlers related code from ActionView::Base to ActionView::Template
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8981 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2008-03-05 02:03:24 +00:00
Pratik Naik
89ee5d63d0
Tests for div_for and content_tag_for helpers. Closes #11223 [thechrisoshow]
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8980 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2008-03-05 01:26:24 +00:00
Michael Koziarski
b3b0a0c388
Make the schema dumper respect the schema settings in database.yml. References #8659 [sveiss]
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8979 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2008-03-03 06:56:31 +00:00
Michael Koziarski
cc5a957d2b
Allow file uploads in Integration Tests. Closes #11091 [RubyRedRick]
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8978 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2008-03-03 06:42:24 +00:00
Michael Koziarski
4ca170fcea
Improve performance on :include/:conditions/:limit queries by selectively joining in the pre-query. Closes #9560 [dasil003]
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8977 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2008-03-03 06:23:38 +00:00
Michael Koziarski
51b6619d4e
Refactor partial rendering into a PartialTemplate class. [Pratik]
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8976 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2008-03-03 04:01:35 +00:00
Geoff Buesing
10d9d0b6fe
Adding TimeWithZone #marshal_dump and #marshal_load
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8975 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2008-03-03 03:49:37 +00:00
Michael Koziarski
42d1172c2d
Add OrderedHash#to_hash. Closes #11266 [josh]
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8974 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2008-03-03 03:31:57 +00:00
Michael Koziarski
b18585fb06
Fix syntax errors in the documentation for image submit tag. Closes #11073 [wharris]
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8970 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2008-03-02 04:42:52 +00:00
Michael Koziarski
c1abe44306
Make the mysql schema dumper roundtrip the limits of text/blob columns. Closes #7424 [will.bryant]
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8969 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2008-03-02 04:42:10 +00:00
Michael Koziarski
4673c47d7b
Allow html_options to be passed to all the date helpers. Closes #6000 [h-lame, Jakob S]
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8968 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2008-03-02 04:40:54 +00:00
Michael Koziarski
6da3771346
Fix regexp to contain only one rjs, and add rhtml [lifofifo]
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8959 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2008-03-01 00:01:28 +00:00
Michael Koziarski
fa4d5f2dc1
Use realtime to reduce garbage. [adymo]
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8958 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2008-02-29 23:17:52 +00:00
Michael Koziarski
13a60b83a4
Improve performance by avoiding named block arguments. Closes #11109 [adymo]
...
Reapplies [8865] with some fixes
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8957 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2008-02-29 23:16:53 +00:00
David Heinemeier Hansson
7dcd0d7d96
Added that requests with JavaScript as the priority mime type in the accept header and no format extension in the parameters will be treated as though their format was :js when it comes to determining which template to render. This makes it possible for JS requests to automatically render action.js.rjs files without an explicit respond_to block [DHH]
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8956 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2008-02-29 18:09:23 +00:00
Jeremy Kemper
18aa19c68a
Provide a post title for sqlite3
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8943 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2008-02-28 21:01:04 +00:00
Jeremy Kemper
5dee6ce9e0
Fix that batched :include would pull in duplicate records in some cases. Closes #11215 [Catfish]
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8942 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2008-02-28 20:42:01 +00:00
Jeremy Kemper
d6e355d1df
mark encoding
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8941 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2008-02-28 20:41:41 +00:00
Jeremy Kemper
5e83612766
Fix Hash#from_xml with Type records. Closes #9242 [Juanjo Bazan, Isaac Feliu]
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8937 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2008-02-27 23:11:08 +00:00
Jeremy Kemper
8352287c72
Fix edge case with colons in times interpreted as bind variables by requiring that bind vars start with a letter. Closes #10519 [matrix9180]
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8936 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2008-02-27 23:05:59 +00:00
Jeremy Kemper
33736bc18a
Changelog attribution for #9312
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8935 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2008-02-27 23:03:10 +00:00
Jeremy Kemper
3582bce6fd
Adding Time#end_of_day, _quarter, _week, and _year. Closes #9312 .
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8934 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2008-02-27 22:53:54 +00:00
Jeremy Kemper
558c5ff251
Fix preloading nil polymorphic belongs_to. Closes #11218 [matrix9180]
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8933 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2008-02-27 22:41:35 +00:00
Jeremy Kemper
0d70f31057
Remove dead code from hmt#delete. Closes #11236 [rubyruy]
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8932 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2008-02-27 22:26:50 +00:00
Jeremy Kemper
c6a3a39fea
Fix rdoc typo. Closes #11205 [wangchun]
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8927 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2008-02-24 00:37:12 +00:00
Jeremy Kemper
9a947af0e7
PostgreSQL: support server versions 7.4 through 8.0 and the ruby-pg driver. Closes #11127
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8922 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2008-02-22 03:26:21 +00:00
Michael Koziarski
01b77da8da
Patch to add a -e (export) option to script/plugin install. Closes #10847 [jon@blankpad.net]
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8921 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2008-02-21 22:44:00 +00:00
Jeremy Kemper
4c3077183b
Add #clear to mem_cache_store, flushes all caches
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8916 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2008-02-21 01:35:27 +00:00
Michael Koziarski
5b5d236792
Sort the results to remove platform dependent test failures
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8915 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2008-02-20 05:57:00 +00:00
Michael Koziarski
44c169397a
Move the eager load nested include tables into schema.rb and use delete_all instead of drop table to reset the state.
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8914 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2008-02-20 05:31:03 +00:00
Michael Koziarski
63173630db
Revert to previous mysql-specific assertion, and only run the test on mysql.
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8913 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2008-02-20 05:30:16 +00:00
Michael Koziarski
aa088e05dc
remove implicit assumption about mysql in the assertion
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8912 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2008-02-20 05:14:46 +00:00
Michael Koziarski
cd937e6ad7
Make date_helper use tag and content_tag. Move to assert_dom_equal instead of assert_equal to avoid being dependent on hash ordering. Closes #11131 [ernesto.jimenez]
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8911 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2008-02-20 04:23:18 +00:00
Michael Koziarski
029fc2f6b4
Sort test cases to make test runs deterministic
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8909 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2008-02-20 02:27:40 +00:00
Michael Koziarski
feac84521f
Remove disconnect! in test case, it causes segfaults on sqlite3 and completely destroys postgresql
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8908 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2008-02-20 01:24:31 +00:00
Michael Koziarski
4eb1413e3b
Cleanup whitespace and remove keys instead of providing nil
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8907 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2008-02-20 00:58:07 +00:00
Michael Koziarski
921752c7d5
Remove reference to 'postgres' user in the connection and Rakefiles. Allows postgres permissions to fallback to host / ident based auth.
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8906 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2008-02-20 00:40:34 +00:00
Jeremy Kemper
ab45bd487a
URI.decode site username/password. Closes #11169 [Ernesto Jimenez]
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8900 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2008-02-19 23:06:09 +00:00
Michael Koziarski
1537aec184
use stubbing instead of monkeypatching to stop tests from interfering with one another. Closes #11163 [RubyRedRick]
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8899 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2008-02-19 21:43:13 +00:00
Michael Koziarski
e32149ad60
Correct typo in before_type_cast code. Closes #11165 [amishyn]
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8898 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2008-02-19 21:01:10 +00:00
Jeremy Kemper
ec98a720ec
Remove mysql option from a test that applies to all databases. References #11154 .
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8897 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2008-02-19 06:01:54 +00:00
Jeremy Kemper
331d9c0491
Don't assume all records from nested include are of same class. Closes #11154 [acechase]
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8896 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2008-02-19 02:56:05 +00:00
Michael Koziarski
21c75e545a
Ensure nested preloading works when associations return nil. Closes #11145 [GMFlash]
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8894 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2008-02-18 04:49:56 +00:00
Michael Koziarski
cae1d960d2
Check the host string contains %d before using String#%, this avoids warnings. Closes #10809 [chuyeow]
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8893 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2008-02-18 01:02:29 +00:00
Michael Koziarski
db4f421b0b
Add :trailing_slash option to UrlWriter. Closes #9117 [juanjo.bazan]
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8892 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2008-02-18 00:42:06 +00:00
Michael Koziarski
8bbabd43a9
Add user and password configuration options to ActiveResource::Base, not all credentials can be specified inline. Closes #11112 [ernesto.jimenez]
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8891 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2008-02-18 00:21:18 +00:00
Michael Koziarski
f2546164d6
Make dynamic finders respect the :include on HasManyThrough associations. Closes #10998 . [cpytel]
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8890 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2008-02-18 00:14:54 +00:00
Jeremy Kemper
23e58a0552
Fix observed_class. References #11099 .
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8889 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2008-02-17 22:52:55 +00:00
Jeremy Kemper
5457770a36
Pass array of addresses
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8888 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2008-02-17 20:07:40 +00:00
Michael Koziarski
1a59aa5196
Update generated comments to reflect the fact that config.frameworks works fine with gems now. Closes #11135 [fxn]
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8887 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2008-02-17 09:11:31 +00:00
Geoff Buesing
4a643f686a
Adding TimeWithZone#between?
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8886 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2008-02-17 00:35:49 +00:00
Geoff Buesing
25e139e545
Time.=== returns true for TimeWithZone instances
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8885 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2008-02-16 23:39:40 +00:00
Geoff Buesing
e7ebd656b3
TimeWithZone #+ and #- behave consistently with numeric arguments regardless of whether wrapped time is a Time or DateTime; consistenty answers false to #acts_like?(:date)
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8884 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2008-02-16 23:15:59 +00:00
Geoff Buesing
3025ff28cc
Tests for distance_of_time_in_words with TimeWithZone instances. Closes #10914 [ernesto.jimenez]
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8883 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2008-02-16 21:16:03 +00:00
Geoff Buesing
2920bd22df
ActiveRecord::Base#instantiate_time_object only uses Time.zone when Base.time_zone_aware_attributes is true; leverages Time#time_with_datetime_fallback for readability
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8882 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2008-02-16 20:47:01 +00:00
Geoff Buesing
4e3ecec9c7
Refactor ActiveRecord::ConnectionAdapters::Column.new_time: leverage DateTime failover behavior of Time#time_with_datetime_fallback
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8881 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2008-02-16 20:13:38 +00:00
Michael Koziarski
1d5ea1857f
Sort files to test to make load order platform independent. Fix the clash this exposes. Closees #11081 [tpope]
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8880 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2008-02-16 03:08:05 +00:00
Michael Koziarski
86cb0a61fb
Ensure that :confirm doesn't need extra quotes when using drop_receiving_element. Closes #8299 [thechrisoshow]
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8879 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2008-02-16 00:07:52 +00:00
Michael Koziarski
4ff26f51f6
Add String#squish and String#squish! to remove consecutive chunks of whitespace. Closes #11123 [jordi, Henrik N]
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8878 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2008-02-16 00:02:30 +00:00
Michael Koziarski
191ffc9456
Serialize BigDecimals as Floats when using to_yaml. Closes #8746 [ernesto.jimenez]
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8877 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2008-02-15 23:33:43 +00:00
Michael Koziarski
3028ca5955
Clear active connections before trying to drop the database. Allows db:drop to work with posgresql. Closes #10559 [jqr]
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8876 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2008-02-15 23:16:01 +00:00
Michael Koziarski
f3fd2b18b7
Add test for Observer#observer_class and change the implementation slightly. Closes #11099 [ernesto.jimenez]
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8875 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2008-02-15 23:09:51 +00:00
Jeremy Kemper
c55120c8e6
Revert [8865], broke AP record identifier. Reopens #11109 .
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8874 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2008-02-15 21:47:27 +00:00
Jeremy Kemper
6f0b0125d0
Fix typo in migration test. Closes #11105 [h-lame]
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8873 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2008-02-15 20:12:45 +00:00
Michael Koziarski
c75abf058e
Avoid repeated calls to Base#connection. Closes #11111 [adymo]
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8871 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2008-02-14 20:09:05 +00:00
Michael Koziarski
838b02450a
Optimisation for BigDecimal conversion code. Closes #11110 [adymo]
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8870 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2008-02-14 20:06:25 +00:00
Michael Koziarski
039f724c7b
Minor formatting changes
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8869 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2008-02-14 20:02:19 +00:00
Rick Olson
de048b1009
Improve associations performance by using symbol callbacks instead of string callbacks. Closes #11108 [adymo]
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8867 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2008-02-14 07:53:37 +00:00
Rick Olson
8a2266c020
Improve associations performance by avoiding named block arguments. Closes #11109
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8865 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2008-02-14 07:24:09 +00:00
Jeremy Kemper
dfa786631b
Introduce the :readonly option to all associations. Records from the association cannot be saved. Closes #11084 .
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8864 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2008-02-13 06:32:50 +00:00
Michael Koziarski
08a4c9979d
Remove options from the attributes method, tidy up the implementation. Closes #11093 [juanjo.bazan, Koz]
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8863 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2008-02-13 02:19:46 +00:00
Michael Koziarski
46356100d1
Make sure render :update support the options hash. Closes #11088 [ernesto.jimenez]
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8862 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2008-02-12 22:42:36 +00:00
Jamis Buck
11787b802a
remove support for ampersand-delimited cookie values
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8861 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2008-02-12 21:45:39 +00:00
Michael Koziarski
8739390134
Avoid cloning in Base#attributes_before_typecast. Closes #11077 [juanjo.bazan]
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8858 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2008-02-11 21:02:17 +00:00
Michael Koziarski
081eed352f
Fix the pre-quoted table names in the eager tests. [mislav]
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8857 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2008-02-11 07:24:25 +00:00
Michael Koziarski
d4daf7bba7
Fix eager loading with pre-quoted table names. Closes #11046 [danielmorrison, Koz, Jeremy Kemper]
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8856 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2008-02-11 02:50:58 +00:00
Geoff Buesing
c9402b2277
Multiparameter attributes for time columns fail over to DateTime when out of range of Time
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8855 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2008-02-10 22:46:31 +00:00
Geoff Buesing
6608a3ef37
Adding TimeWithZone #to_yaml, #to_datetime, #eql? and method aliases for duck-typing compatibility with Time
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8854 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2008-02-10 22:26:16 +00:00
Geoff Buesing
8ad5a29cef
TimeWithZone #in_time_zone returns +self+ if zone argument is the same as #time_zone
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8853 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2008-02-10 20:35:47 +00:00
Geoff Buesing
8831180b15
Adding TimeWithZone #to_a, #to_f, #to_i, #httpdate, #rfc2822
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8852 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2008-02-10 20:04:14 +00:00
Geoff Buesing
163a4c6f45
Pruning unneeded TimeWithZone#change_time_zone_to_current
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8851 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2008-02-10 19:15:32 +00:00
Geoff Buesing
b9be374ddd
Time#zone=, #in_time_zone and #change_time_zone accept a Duration
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8850 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2008-02-10 19:02:30 +00:00
Geoff Buesing
db4fc6f206
Time#in_time_zone handles Time.local instances correctly
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8849 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2008-02-10 18:45:55 +00:00
Geoff Buesing
521714a39d
Pruning unneeded Time#change_time_zone_to_current. Enhanced docs for #change_time_zone
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8848 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2008-02-10 18:20:37 +00:00
Geoff Buesing
94fa9fb745
TimeZone#new renamed #local, so that new TimeWithZone instances can be created via Time.zone.local()
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8847 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2008-02-10 17:02:22 +00:00
Michael Koziarski
2c8fb682cb
Show RecordInvalid in the documentation. References #10976 [kampers]
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8845 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2008-02-10 02:49:11 +00:00
Michael Koziarski
5396b0f3b0
Use HEAD instead of GET inside exists? Closes #11062 [bscofield]
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8827 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2008-02-09 22:21:55 +00:00
Michael Koziarski
9e13b966f6
Move SecretKeyGenerator comments to the correct place for rdoc. Closes #10940 [FooBarWidget]
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8826 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2008-02-09 22:18:38 +00:00
Michael Koziarski
3df052ac60
Remove misleading / incorrect warning from validation documentation. Closes #8241 [quixoten, pedz, tom]
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8825 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2008-02-09 08:24:35 +00:00
Michael Koziarski
cadb087deb
Avoid cloning in Base#attributes. Closes #11047 [juanjo.bazan]
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8824 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2008-02-08 23:35:33 +00:00
Marcel Molina
3d1a30bc59
Ooops. Add fixture partials for last commit
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8823 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2008-02-08 22:33:17 +00:00
Marcel Molina
c848c4c621
Fix problem with render :partial collections, records, and locals. #11057 [lotswholetime]
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8822 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2008-02-08 22:04:06 +00:00
Jeremy Kemper
218417b8a9
Remove empty .rhtml templates
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8820 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2008-02-07 23:10:01 +00:00
David Heinemeier Hansson
56d0e33037
Added support for naming concrete classes in sweeper declarations [DHH]
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8819 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2008-02-07 22:50:49 +00:00
David Heinemeier Hansson
40f67639c8
Fix that the options hash can be nil when coming from fragments
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8818 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2008-02-07 22:04:24 +00:00
Jeremy Kemper
3335bd12c8
ActiveSupport::Base64.encode64s since Base64 is deprecated
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8817 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2008-02-07 21:50:46 +00:00
David Heinemeier Hansson
fbd7ec3c9f
Added Base64.encode64s to encode values in base64 without the newlines. This makes the values immediately usable as URL parameters or memcache keys without further processing [DHH]
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8816 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2008-02-07 21:09:23 +00:00
Rick Olson
4a9fc4424f
Remove ERB trim variables from trace template in case ActionView::Base.erb_trim_mode is changed in the application. Closes #10098 [tpope, kampers]
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8813 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2008-02-07 17:06:53 +00:00
Rick Olson
efa739d73d
Fix typo in form_helper documentation. Closes #10650 [xaviershay, kampers]
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8812 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2008-02-07 16:50:55 +00:00
Rick Olson
8e6638afa4
Fix bug with setting Request#format= after the getter has cached the value. Closes #10889 [cch1]
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8811 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2008-02-07 16:46:50 +00:00
Rick Olson
689e27567e
Remove :nodoc: entries around the ActiveSupport test/unit assertions. Closes #10946 [dancroak, jamesh]
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8810 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2008-02-07 16:43:16 +00:00
Rick Olson
57cea9c945
Add a slightly more informative exception message for ActionView::TemplateFinder::InvalidViewPath [rick]
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8809 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2008-02-07 02:45:13 +00:00
Michael Koziarski
cfb8ba0003
Add uses_tzinfo to active record tests to prevent breaking the cc.rb build etc. Closes #11034 [mpalmer]
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8808 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2008-02-06 22:26:47 +00:00
Rick Olson
13264afb12
Correct inconsistencies in RequestForgeryProtection docs. #11032 [mislav]
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8807 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2008-02-06 18:50:48 +00:00
Rick Olson
72385a7be6
Add Time Zone support to ActiveRecord, and config.time_zone property for specifying a default Time Zone. Closes #10982 [Geoff Buesing, rick]
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8806 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2008-02-06 06:43:02 +00:00
Michael Koziarski
692dbbf793
Introduce a Template class to ActionView. Closes #11024 [lifofifo]
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8805 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2008-02-06 04:26:40 +00:00
Michael Koziarski
8bc9018882
Make the docs reference the correct function. [Tobi Reif]
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8802 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2008-02-04 23:29:21 +00:00
Rick Olson
20bab5bc64
ensure that the after_initialize hooks are run after the application initializers have run
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8795 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2008-02-03 17:54:39 +00:00
Jeremy Kemper
ac2b213135
MySQL: memoize column and table name quoting to reduce garbage
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8794 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2008-02-03 12:11:52 +00:00
Jeremy Kemper
72640c6125
Cache partial variable names to reduce garbage
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8793 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2008-02-03 12:11:30 +00:00
Jeremy Kemper
53eca3abc8
Add --measure option to script/performance/request to set ruby-prof measure mode: process_time, wall_time, cpu_time, allocations, memory.
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8792 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2008-02-03 12:11:12 +00:00
Jeremy Kemper
780151c01e
Fix missing extension for caching. Closes #10733 [Catfish, tcoppock, mpalmer]
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8791 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2008-02-03 01:11:42 +00:00
Jeremy Kemper
78253acb59
Revert r8742: remove has_many with :group option since it has sketchy sql support. Closes #10480 .
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8790 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2008-02-03 01:09:58 +00:00
Jeremy Kemper
7fe2ad7279
Ruby 1.9 compat: declare utf-8 file encoding
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8789 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2008-02-02 22:52:32 +00:00
Jeremy Kemper
c5d89bc934
Slight camelize speedup [Pratik Naik]
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8788 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2008-02-02 21:42:39 +00:00
Rick Olson
5ef2b089f0
Reshuffle load order so that routes and observers are initialized after plugins and app initializers. Closes #10980 [rick, fxn]
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8787 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2008-02-02 20:18:18 +00:00
Jeremy Kemper
0da2aa6d11
Introduce the :index option for form_for and fields_for to simplify multi-model forms (see http://railscasts.com/episodes/75 ). Closes #9883 .
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8786 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2008-02-02 06:16:04 +00:00
Jeremy Kemper
fadaba679a
Introduce map.resources :cards, :as => 'tarjetas' to use a custom resource name in the URL: cards_path == '/tarjetas'. Closes #10578 .
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8785 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2008-02-02 05:57:16 +00:00
Jeremy Kemper
9e1d91c24b
TestSession supports indifferent access. Closes #7372 .
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8782 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2008-02-02 05:32:44 +00:00
Jeremy Kemper
fbd3eb7142
Less verbose mail logging: just recipients for :info log level; the whole email for :debug only. Closes #8000 .
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8781 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2008-02-02 05:32:15 +00:00
Jeremy Kemper
5bbc461fcb
Fix calculations on associations with custom :foreign_key. Closes #8117 [kamal, jack]
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8778 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2008-02-02 04:28:42 +00:00
Jeremy Kemper
6d8534acc0
When multiparameter date assignment fails due to an invalid date, fall back to create a Time and convert to_date. Closes #10556 [leikind]
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8777 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2008-02-02 03:37:25 +00:00
Jeremy Kemper
b1ea27630d
Fix has_many :through a polymorphic has_many. Closes #10529 [Aleksey Kondratenko]
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8776 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2008-02-02 03:27:31 +00:00
Jeremy Kemper
9d79e0668d
Fix number_to_human_size incorrectly removing trailing zeros. Closes #10099 [libc, developingchris]
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8774 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2008-02-02 02:59:10 +00:00
Jeremy Kemper
b84a33ddd1
Don't split cookies on comma also. References r8505.
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8773 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2008-02-02 02:55:44 +00:00
Jeremy Kemper
7527447ba1
Git support for script/generate. Closes #10690 .
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8772 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2008-02-02 02:55:14 +00:00
Michael Koziarski
95af46861a
Simplified, faster implementation of Benchmark.realtime [Alexander Dymo]
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8771 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2008-02-02 01:53:58 +00:00
Michael Koziarski
6d39d05269
Avoid Base#attributes when saving / creating records. Closes #10978 [adymo]
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8770 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2008-02-01 23:15:57 +00:00
Jeremy Kemper
0d26e47b29
MemCacheStore#write and #delete return a boolean indicating whether the operation succeeded
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8767 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2008-02-01 08:25:58 +00:00
Jeremy Kemper
09d98f1331
Bundled memcache client consistently returns server responses and checks for errors
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8766 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2008-02-01 08:25:46 +00:00
Jeremy Kemper
601222f294
MemCacheStore#write uses add by default and set if :force => true
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8765 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2008-02-01 07:07:56 +00:00
Jeremy Kemper
e59de6046c
Add a handful of cache store tests
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8764 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2008-02-01 01:43:47 +00:00
Jeremy Kemper
2f7ce08b56
cache.fetch(key, :force => true) to force a cache miss
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8763 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2008-02-01 01:33:42 +00:00
Jeremy Kemper
be827f9348
Fixed preloading belongs_to associations which reference a custom foreign key. References #9640 .
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8762 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2008-01-31 07:50:15 +00:00
Jeremy Kemper
e59978aa86
MySQL: omit text/blob defaults from the schema instead of using an empty string. Closes #10963 .
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8757 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2008-01-30 23:22:58 +00:00
Michael Koziarski
1ba5fc745b
Move the declaration of the compilation related cattr_accessors to compilable. Closes #10959 [lifofifo]
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8756 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2008-01-30 21:09:32 +00:00
Michael Koziarski
05707a436b
Make the non inferrable controller message a little friendlier. [Koz]
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8749 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2008-01-30 01:32:28 +00:00
Michael Koziarski
900d6d7bd2
Make assert_routing aware of the HTTP method used. Closes #8039 [mpalmer]
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8748 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2008-01-30 01:25:44 +00:00
Rick Olson
9623264c09
Remove unnofficial 'PST' timezone
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8747 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2008-01-29 01:23:53 +00:00
Rick Olson
bd72d06374
Support retrieving TimeZones with a Duration. TimeZone[-28800] == TimeZone[-480.minutes]. [rick]
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8746 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2008-01-29 01:09:49 +00:00
Jeremy Kemper
859ca3a1ea
Add posts.comments_count for other databases. Closes #10804 .
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8745 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2008-01-28 18:45:12 +00:00
Michael Koziarski
aecb7fbefc
Correct line numbers from template errors. Closes #10937 [Aleksey Kondratenko]
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8744 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2008-01-27 20:48:13 +00:00
Michael Koziarski
c155fe9a39
Precalculate the Backtrace of a template error to avoid raising exceptions in TemplateError#backtrace. These will abort the ruby vm. Closes #10936 [Aleksey Kondratenko]
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8743 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2008-01-27 20:45:35 +00:00
Michael Koziarski
9500ad5fbc
Make sure count works on has_many :through associations using :group. Closes #10480 [remvee]
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8742 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2008-01-27 02:41:55 +00:00
Michael Koziarski
f11904ad6d
Add documentation for polymorphic URL helpers, make API consistent for polymorphic_path and polymorphic_url.
...
Closes #10883 [mislav] Closes #8782 [gbuesing] Closes #8720 [gbuesing]
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8741 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2008-01-27 01:18:47 +00:00
Michael Koziarski
10aa728e8b
Don't repeatedly add relative_url_root to asset sources. Closes #10767 [tomtoday, Koz]
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8740 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2008-01-27 01:10:48 +00:00
Michael Koziarski
5ac3a9bd0b
Use File.join to construct partial path. Closes #10932 [patrick.t.joyce]
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8739 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2008-01-27 01:03:56 +00:00
Michael Koziarski
6e165b8940
Make it simpler to make the root route an alias for another route. Closes #10818 [bscofield]
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8738 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2008-01-26 08:41:19 +00:00
Michael Koziarski
07132865d6
Remove dead attr_reader from association proxy. Closes #10668 [danger]
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8737 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2008-01-26 08:33:48 +00:00
Michael Koziarski
c48f744400
Make sure that belongs_to counter decrements when assigning nil Closes #10804 [jeanmartin]
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8735 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2008-01-26 06:23:03 +00:00
Michael Koziarski
02625c9c96
Correct documentation for dom_id [jbarnette] Closes #10775
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8734 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2008-01-26 05:11:09 +00:00
Michael Koziarski
176abc842c
Add tests and documentation for allow_blank. Closes #10651 [blj]
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8733 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2008-01-26 05:08:20 +00:00
Geoff Buesing
8ef3dfff7a
TimeWithZone#- added, so that #- can handle a Time or TimeWithZone argument correctly
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8732 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2008-01-26 00:34:44 +00:00
Geoff Buesing
c95365a00e
with_timezone test helper renamed with_env_tz, to distinguish between setting ENV['TZ'] and setting Time.zone in tests
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8731 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2008-01-26 00:11:59 +00:00
Geoff Buesing
dad3e835f7
Time#- coerces TimeWithZone argument to a Time instance so that difference in seconds can be calculated. Closes #10914 [Geoff Buesing, yyyc514]
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8730 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2008-01-25 23:55:07 +00:00
Geoff Buesing
4b2ac708b7
Adding UTC zone to TimeZone; TimeWithZone no longer has to fake UTC zone with nil
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8720 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2008-01-25 18:23:22 +00:00
Geoff Buesing
a7adca3d3b
Time.get_zone refactored to private method, given that the encapsulated logic is only useful internally
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8719 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2008-01-25 16:12:43 +00:00
Geoff Buesing
c911e1ac08
Time.zone uses thread-local variable for thread safety. Adding Time.use_zone, for
...
overriding Time.zone locally inside a block. Removing unneeded Time.zone_reset!
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8718 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2008-01-25 15:52:23 +00:00
Michael Koziarski
9f1fdcc27d
Handle corner case with image_tag when passed 'messed up' image names. Closes #9018 [duncanbeevers, mpalmer]
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8717 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2008-01-25 04:13:50 +00:00
Geoff Buesing
2168178bdb
TimeZone#to_s uses UTC rather than GMT; reapplying change that was undone in [8679]. References #1689
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8716 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2008-01-25 03:54:10 +00:00
Geoff Buesing
8f7232bc76
Time.days_in_month defaults to current year if no year is supplied as argument, uses Date.gregorian_leap? to determine leap year, and uses constant lookup to determine days in month. Closes #10799 [Radar]
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8715 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2008-01-25 03:29:20 +00:00
Geoff Buesing
ac03ad1f78
Adding Time and DateTime #compare_with_coercion, which layers behavior on #<=> so that any combination of Time, DateTime and ActiveSupport::TimeWithZone instances can be chronologically compared
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8711 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2008-01-23 22:22:36 +00:00
Geoff Buesing
213fac6f49
TimeZone#now returns an ActiveSupport::TimeWithZone
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8710 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2008-01-23 20:49:53 +00:00
Geoff Buesing
cb8de22dfb
Time #in_current_time_zone and #change_time_zone_to_current return self when Time.zone is nil
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8708 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2008-01-23 18:49:54 +00:00
Marcel Molina
b2fa70a8e1
Indicate in documentation that newer version of AR support eager loading in polymorphic associations. Closes #10861 [fxn]
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8707 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2008-01-23 17:06:40 +00:00
Marcel Molina
349df75605
Reference to :element option in documentation should be :member. Closes #10905 [fxn]
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8706 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2008-01-23 17:04:49 +00:00
Geoff Buesing
2d0d348fb2
Remove unneeded #to_datetime_default_s alias for DateTime#to_s, given that we inherit a #to_default_s from Date that does exactly the same thing
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8705 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2008-01-23 16:10:28 +00:00
Jeremy Kemper
2cd8424aae
Preserve integration session's request_count
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8701 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2008-01-23 08:37:58 +00:00
Jeremy Kemper
8273280a63
Enumerable#group_by uses ActiveSupport::OrderedHash
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8700 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2008-01-23 07:25:20 +00:00
Geoff Buesing
fc71a07edb
Refactor Time and DateTime #to_formatted_s: use ternary instead of nested if/else
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8699 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2008-01-23 02:53:29 +00:00
Geoff Buesing
abb24b484f
Adding Time and DateTime #formatted_offset, for outputting +HH:MM utc offset strings with cross-platform consistency
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8698 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2008-01-23 02:46:47 +00:00
Geoff Buesing
2e7b2f0344
Adding alternate_utc_string option to TimeZone#formatted_offset. Removing unneeded TimeZone#offset
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8697 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2008-01-23 02:11:00 +00:00
Geoff Buesing
022d9f7ce6
Introduce ActiveSupport::TimeWithZone, for wrapping Time instances with a TimeZone. Introduce instance methods to Time for creating TimeWithZone instances, and class methods for managing a global time zone
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8696 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2008-01-23 01:56:22 +00:00
Michael Koziarski
a91b7f1975
require test/unit explicitly otherwise the at_exit handler doesn't get called [jbarnette]
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8690 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2008-01-22 08:32:50 +00:00
Michael Koziarski
c0110a9faa
Refactor template compilation from AV::Base into the template handlers. Closes #10888 [lifofifo]
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8689 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2008-01-22 01:46:34 +00:00
Michael Koziarski
91de20d621
Add options missing from earlier changeset
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8688 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2008-01-22 01:29:10 +00:00
David Heinemeier Hansson
29938ba0f0
Log an error to the console when the memcache server is raising
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8687 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2008-01-22 00:09:08 +00:00
Michael Koziarski
7701e6466d
Add label_tag helper for generating elements. Closes #10802 [DefV]
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8685 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2008-01-21 21:08:28 +00:00
Michael Koziarski
37f71a77cc
missing changelog for [8683]
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8684 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2008-01-21 21:07:43 +00:00
Michael Koziarski
61c90a4ad6
Reapply the TemplateFinder first applied in [8669] then reverted in [8676]. Closes #10800 [lifofifo]
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8683 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2008-01-21 20:45:04 +00:00
Jeremy Kemper
32b36b8936
Add missing author_addresses.yml fixture. Closes #10592 .
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8682 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2008-01-21 17:21:12 +00:00
Jeremy Kemper
39814fcce0
Merge branch 'ar-test-cleanup' of git://git.geeksomnia.com/rails
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8681 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2008-01-21 17:20:51 +00:00
Geoff Buesing
1d4f4cdfe2
Replace non-dst-aware TimeZone class with dst-aware class from tzinfo_timezone plugin. TimeZone#adjust and #unadjust are no longer available; tzinfo gem must now be present in order to perform time zone calculations, via #local_to_utc and #utc_to_local methods.
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8679 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2008-01-21 03:55:54 +00:00
Michael Koziarski
9c4beb5e98
Tidy up description for the rake test task. Closes #10598 [akaspick]
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8678 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2008-01-20 23:27:19 +00:00
Michael Koziarski
250a1194b9
Ensure mime types can be compared with symbols. Closes #10796 [bscofield]
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8677 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2008-01-20 22:55:25 +00:00
Jeremy Kemper
88bc014acc
Revert r8669 for now, breaks Action Mailer. Reopens #10800 .
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8676 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2008-01-19 06:01:57 +00:00
Jeremy Kemper
16b129a68c
belongs_to supports :dependent => :destroy and :delete. Closes #10592 .
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8675 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2008-01-19 05:30:42 +00:00
Jeremy Kemper
f95ff8d4dc
Performance: optimize route recognition. Large speedup for apps with many resource routes. Closes #10835 .
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8674 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2008-01-19 05:25:20 +00:00
Jeremy Kemper
630c643f5b
Add timing test for large restful route recognition. References #10835 [oleganza]
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8673 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2008-01-19 05:24:44 +00:00
Jeremy Kemper
355a8ff2cd
Introduce preload query strategy for eager :includes. Closes #9640 .
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8672 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2008-01-19 04:19:53 +00:00
Jeremy Kemper
abdf546ad6
Support aggregations in finder conditions. Closes #10572 .
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8671 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2008-01-19 03:45:24 +00:00
Jeremy Kemper
3877dfc72b
Remove dead code. Closes #10698 [garru]
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8670 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2008-01-19 03:23:45 +00:00
Jeremy Kemper
84b0f9c739
Introduce TemplateFinder to handle view paths and lookups. Closes #10800 .
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8669 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2008-01-19 03:20:39 +00:00
Jeremy Kemper
4a644575c8
Update vendor version number
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8668 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2008-01-19 03:13:44 +00:00
Jeremy Kemper
982d909295
Update tmail to r208 versioned as 1.2.2
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8667 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2008-01-19 03:13:34 +00:00
Jeremy Kemper
abfab89fd8
Ruby 1.9 compat: test encoding fixes. Closes #10597 [murphy]
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8666 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2008-01-19 03:03:38 +00:00
Jeremy Kemper
52876c6010
Move rake contrib require to task
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8665 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2008-01-19 03:03:28 +00:00
Jeremy Kemper
aae37bb4f7
Extract ActiveSupport::Callbacks from Active Record, test case setup and teardown, and ActionController::Dispatcher. Closes #10727 .
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8664 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2008-01-19 02:44:45 +00:00
Jeremy Kemper
3ffdfa84fc
Remove table quoting; only pull last_insert_id if there's a primary key.
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8663 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2008-01-19 02:43:31 +00:00
Jeremy Kemper
ddbaacfd4a
Organize and clean up the Active Record test suite. Closes #10742 .
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8662 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2008-01-18 07:31:51 +00:00
Jeremy Kemper
1e70928014
Fix paths
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8661 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2008-01-18 07:31:37 +00:00
Jeremy Kemper
42b39ae3f2
Move tests to cases
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8660 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2008-01-18 07:30:42 +00:00
Jeremy Kemper
105a27f39e
move schema
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8659 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2008-01-18 07:29:00 +00:00
Jeremy Kemper
e899a83a85
move migrations
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8658 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2008-01-18 07:28:07 +00:00
Jeremy Kemper
43b81d01d0
move assets and models
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8657 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2008-01-18 07:27:03 +00:00
Rick Olson
49794485b6
Ensure that modifying has_and_belongs_to_many actions clear the query cache. Closes #10840 [john.andrews]
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8653 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2008-01-18 01:55:11 +00:00
Michael Koziarski
3845de022b
Restructure routing into several smaller files. References #10835 [oleganza]
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8652 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2008-01-17 22:45:54 +00:00
Michael Koziarski
3b9bcf13f9
Correct fix for [8647], Closes #6868 . [isak]
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8650 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2008-01-16 21:56:45 +00:00
Geoff Buesing
47ff3aa91f
Introducing DateTime #utc, #utc? and #utc_offset, for duck-typing compatibility with Time. Closes #10002
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8649 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2008-01-16 20:07:10 +00:00
Michael Koziarski
61e550ade9
Don't ignore :precision and :scale when adding columns on postgresql. Closes #6868 [w.piekutowski]
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8647 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2008-01-16 03:54:15 +00:00
Michael Koziarski
b812b23687
Make render :partial recognise form builders and use the _form partial. Closes #10814 [djanowski]
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8646 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2008-01-16 02:01:57 +00:00
Michael Koziarski
8a71f87009
Ensure that the tests use the instance-level view-paths correctly. Closes #10820 [lifofifo]
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8645 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2008-01-16 01:41:31 +00:00
Michael Koziarski
76ea495ec9
Correct docs on caching and all.js
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8641 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2008-01-14 04:22:44 +00:00
Michael Koziarski
4b7091f32a
Use non-blocking writing if available. Closes #10794 [lifofifo]
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8638 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2008-01-13 20:39:51 +00:00
Michael Koziarski
7e1c04d866
Allow users to declare other namespaces when using the atom feed helpers. Closes #10304 [david.calavera]
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8637 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2008-01-13 00:11:39 +00:00
Geoff Buesing
772ad95201
Time#to_json uses Numeric#to_utc_offset_s to output cross-platform-consistent representation without having to convert to DateTime. References #9750
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8636 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2008-01-12 21:02:46 +00:00
Geoff Buesing
e9dad7496d
Refactor number-to-HH:MM-string conversion logic from TimeZone#formatted_offset to reusable Numeric#to_utc_offset_s method
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8635 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2008-01-12 20:44:31 +00:00
Michael Koziarski
7501451d7f
don't misbehave when redirecting to nil. Closes #10272 [farleyknight]
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8633 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2008-01-12 03:09:39 +00:00
Michael Koziarski
fb63fc67fb
Add some tests for adv_attr_accessor. Closes #10633 [fcheung]
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8632 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2008-01-12 03:06:10 +00:00
David Heinemeier Hansson
eff27ab119
Fix a few caching errors, expose a case thats still not working (ref #107330 [catfish]
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8630 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2008-01-12 01:19:46 +00:00
Rick Olson
3dd6027f70
Update scaffold to use labels instead of bold tags. Closes #10757 [zach-inglis-lt3]
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8629 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2008-01-12 01:05:36 +00:00
Jeremy Kemper
9889d86a6c
Introduce send_file :x_sendfile => true to send an X-Sendfile response header.
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8628 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2008-01-11 22:07:04 +00:00
Rick Olson
ebfd03b938
Fix issue where Table#references doesn't pass a :null option to a *_type attribute for polymorphic associations. Closes #10753 [railsjitsu]
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8627 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2008-01-11 19:54:19 +00:00
David Heinemeier Hansson
5d1a305f06
Fixed ActionView::Helpers::ActiveRecordHelper::form for when protect_from_forgery is used ( closes #10739 ) [jeremyevans]
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8626 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2008-01-11 16:25:23 +00:00
Michael Koziarski
104f31af1d
Provide a nicer way to access headers. request.headers["Content-Type"] instead of request.headers["HTTP_CONTENT_TYPE"] [Koz]
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8625 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2008-01-11 06:39:56 +00:00
Michael Koziarski
e6de95889d
* Pass around handler instances, not their classes [Koz]
...
* Move compilation, rendering and 'compilable?' checks into the Handlers [Koz]
* Remove delegate_* methods as the handler is now an instance [Koz]
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8624 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2008-01-11 04:45:06 +00:00
Jeremy Kemper
feea0f106e
Reorder changelog. References #10766 .
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8622 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2008-01-11 02:11:47 +00:00
Rick Olson
2dda639120
Updated TMail to version 1.2.1 [raasdnil]
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8620 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2008-01-11 01:55:20 +00:00
Jeremy Kemper
a8eb90fcee
Move fragment caching from special helper methods to TemplateHandler. Closes #10754 [Josh Peek]
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8619 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2008-01-10 03:17:20 +00:00
Jeremy Kemper
59f222dbf7
UrlWriter respects relative_url_root. Closes #10748 .
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8616 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2008-01-10 02:51:09 +00:00
Jeremy Kemper
3642a4d6f8
Resurrect WordNet synonym lookups. Closes #10710 .
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8615 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2008-01-10 02:50:43 +00:00
David Heinemeier Hansson
f05b870ae0
Fix CacheHelper#cache ( closes #10733 ) [mindforge]
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8614 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2008-01-10 00:47:08 +00:00
David Heinemeier Hansson
4ad3721a17
Re-enable the debugger in testing
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8613 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2008-01-09 18:50:06 +00:00
David Heinemeier Hansson
72bd4ff3e6
Show that a different cache store can be used
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8612 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2008-01-09 18:49:50 +00:00
Jeremy Kemper
882f6884a6
Simplify to_formatted_s docs. Closes #10747 [Jeremy Kemper]
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8608 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2008-01-09 09:45:56 +00:00
Jeremy Kemper
c9fc4d2ca3
Document date and time to_formatted_s. Closes #10747 [leethal]
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8606 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2008-01-09 08:46:08 +00:00
Jeremy Kemper
e9b862acb0
Fix up Enumerable#group_by
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8604 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2008-01-09 08:37:36 +00:00
Jeremy Kemper
7e56c72fae
observed_subclasses gives [] if there are no observed classes
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8602 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2008-01-09 01:33:15 +00:00
Michael Koziarski
5ef8a81b84
Don't append the forgery token to an ajax request if it's serializing a form, prevents duplicate tokens. Closes #10684 [macournoyer]
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8598 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2008-01-08 21:17:08 +00:00
Michael Koziarski
934706a8da
Replace labelled_form_for example with one that will actually work. References #10738 [justinfrench, Koz]
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8597 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2008-01-08 21:16:22 +00:00
Michael Koziarski
96d3b7ced4
Improve documentation to classify to make it clear that it expects names to be plural. Reference #10615 [kris_chambers]
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8596 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2008-01-08 21:15:49 +00:00
Jeremy Kemper
8f7fa55e8d
Fixtures: removed support for the ancient pre-YAML file format. Closes #10736 .
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8594 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2008-01-08 03:54:40 +00:00
Rick Olson
ce84cebc0e
Doc fixes for #atom_feed_helper. Closes #10715 [hasmanyjosh]
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8593 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2008-01-07 20:44:40 +00:00
Jeremy Kemper
07fcac508a
Ruby 1.9 compat: don't rely on Array#to_s to flatten and join as string
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8590 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2008-01-07 08:12:34 +00:00
Jeremy Kemper
7324444344
Ruby 1.9 compat: cookie store delete sets nil value instead of empty string
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8589 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2008-01-07 08:12:03 +00:00
Jeremy Kemper
3600536b04
Ruby 1.9 compat: account for hash ordering
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8588 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2008-01-07 08:10:23 +00:00
Jeremy Kemper
3a62e0e868
Ruby 1.9 compat: check dom equality
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8587 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2008-01-07 08:09:06 +00:00
Jeremy Kemper
008becb5a2
Use explicit toplevel namespace for constant reference in AS::BasicObject
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8586 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2008-01-07 08:08:22 +00:00
Jeremy Kemper
607511c1e0
Ruby 1.9 compat: truncate and excerpt helpers
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8584 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2008-01-07 00:12:53 +00:00
Jeremy Kemper
3b13a09e89
Filter procs must take 1 or 2 arguments. Raise ArgumentError otherwise.
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8583 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2008-01-07 00:12:43 +00:00
Jeremy Kemper
2b326a7155
Ruby 1.9 compat: remove stray colon
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8582 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2008-01-07 00:12:32 +00:00
Jeremy Kemper
7671e98397
remove rubyforgepublisher, removed from rake
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8581 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2008-01-07 00:12:18 +00:00
Jeremy Kemper
880081549d
Use a decorator module for Files instantiated by Hash.from_xml. Add test coverage. Closes #10726 [Cheah Chu Yeow]
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8579 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2008-01-06 20:53:47 +00:00
Jeremy Kemper
a1b0349362
The asset_host block takes the controller request as an optional second argument. Example: use a single asset host for SSL requests. Closes #10549 .
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8578 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2008-01-06 20:53:23 +00:00
Jeremy Kemper
ca4c7ab362
Support render :text => nil. Closes #6684 .
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8577 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2008-01-06 20:52:57 +00:00
Jeremy Kemper
523658c1df
Simplify and speedup Hash#stringify_keys! References #10717 [Cheah Chu Yeow]
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8576 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2008-01-06 20:28:17 +00:00
Jeremy Kemper
9829212849
Ruby 1.9 compat: instance_eval binding to get the record binding instead of accidentally getting current Kernel#binding. Closes #10716 [Dirkjan Bussink]
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8575 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2008-01-06 20:27:56 +00:00
Jeremy Kemper
ebe3a0d532
More thoroughly quote table names. Exposes some issues with sqlite2 adapter. Closes #10698 .
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8571 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2008-01-05 14:58:28 +00:00
Jeremy Kemper
139b92495f
* Continue evolution toward ActiveSupport::TestCase and friends. #10679 [Josh Peek]
...
* TestCase: introduce declared setup and teardown callbacks. Pass a list of methods and an optional block to call before setup or after teardown. Setup callbacks are run in the order declared; teardown callbacks are run in reverse. [Jeremy Kemper]
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8570 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2008-01-05 13:34:15 +00:00
Jeremy Kemper
fe66397adf
require abstract_unit directly since test is in load path
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8569 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2008-01-05 13:33:12 +00:00
Jeremy Kemper
dbed69249f
require abstract_unit directly since test is in load path
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8568 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2008-01-05 13:33:00 +00:00
Jeremy Kemper
f8c12301bb
remove some more absolute requires
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8567 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2008-01-05 13:32:48 +00:00
Jeremy Kemper
1f2e9bb280
require abstract_unit directly since test is in load path
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8566 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2008-01-05 13:32:38 +00:00
Jeremy Kemper
1ad87adc9f
require abstract_unit directly since test is in load path
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8565 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2008-01-05 13:32:22 +00:00
Jeremy Kemper
9d755f1983
require abstract_unit directly since test is in load path
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8564 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2008-01-05 13:32:06 +00:00
Jeremy Kemper
f6d8526659
require abstract_unit directly since test is in load path
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8563 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2008-01-05 13:31:04 +00:00
Jeremy Kemper
b144818698
Document that .build doesn't apply to has_many :through associations. Closes #10707 [GMFlash]
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8562 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2008-01-05 02:21:25 +00:00
Jeremy Kemper
83f65594de
Prefer to instantiate fixtures with model classes instead of their names, avoiding excess constant lookups. Closes #10677 [nwilmes]
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8561 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2008-01-05 02:20:57 +00:00
Jeremy Kemper
f42063d038
Cache fixture model class. References #10677 [nwilmes]
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8560 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2008-01-05 02:20:26 +00:00
Jeremy Kemper
3464a7e79c
assert_response failures include the exception message. Closes #10688 .
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8559 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2008-01-05 02:19:48 +00:00
Jeremy Kemper
5ccc3cf448
Move model dependency to the end of the scaffold generator manifest. Closes #10696 [drnic]
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8558 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2008-01-05 00:26:27 +00:00
Jeremy Kemper
752f633bc5
Document that eager loading doesn't work with polymorphic associations. Closes #10610 [Xavier Noria]
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8556 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2008-01-04 23:21:52 +00:00
Jeremy Kemper
dc604b43a0
Ruby 1.9: Module#local_constants can now just use constants(false). Closes #10648 [Xavier Noria]
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8555 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2008-01-04 03:25:20 +00:00
Jeremy Kemper
c36f8111a6
pdate_all ignores scoped :order and :limit, so post.comments.update_all doesn't try to include the comment order in the update statement. Closes #10686 .
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8554 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2008-01-04 03:19:50 +00:00
Jeremy Kemper
25db1fc201
Ruby 1.9 compat: test multibyte chars proxy for 1.8 only
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8553 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2008-01-04 03:19:20 +00:00
David Heinemeier Hansson
2a9ad9ccbc
Moved the caching stores from ActionController::Caching::Fragments::* to ActiveSupport::Cache::*. If you're explicitly referring to a store, like ActionController::Caching::Fragments::MemoryStore, you need to update that reference with ActiveSupport::Cache::MemoryStore [DHH] Deprecated ActionController::Base.fragment_cache_store for ActionController::Base.cache_store [DHH] All fragment cache keys are now by default prefixed with the 'views/' namespace [DHH] Added ActiveRecord::Base.cache_key to make it easier to cache Active Records in combination with the new ActiveSupport::Cache::* libraries [DHH] Added ActiveSupport::Gzip.decompress/compress(source) as an easy wrapper for Zlib [Tobias Luetke] Included MemCache-Client to make the improved ActiveSupport::Cache::MemCacheStore work out of the box [Bob Cottrell, Eric Hodel] Added config.cache_store to environment options to control the default cache store (default is FileStore if tmp/cache is present, otherwise MemoryStore is used) [DHH]
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8546 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2008-01-03 21:05:12 +00:00
Michael Koziarski
288553540b
Ruby 1.9: Forwards compatibility change for fixtures and the new CSV module [JEG2]
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8544 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2008-01-03 19:14:38 +00:00
David Heinemeier Hansson
32876476a7
Refactored ActionController::Verification and improved docs ( closes #10681 ) [jamesh]
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8543 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2008-01-03 15:49:59 +00:00
David Heinemeier Hansson
e2e98ef0b8
Made fragment caching in views work for rjs and builder as well ( closes #6642 ) [zsombor]
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8542 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2008-01-03 15:35:10 +00:00
David Heinemeier Hansson
d5645fd4a0
Fixed rendering of partials with layout when done from site layout ( closes #9209 ) [antramm]
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8541 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2008-01-03 15:28:36 +00:00
Jeremy Kemper
7b8ee2438f
Ruby 1.9 compat: don't use obsolete ParseDate
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8540 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2008-01-03 02:59:03 +00:00
Jeremy Kemper
f7f0e7b833
Remove toplevel rubyforgepublisher require for new Rake
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8539 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2008-01-03 02:58:43 +00:00
Jeremy Kemper
2ae55ca0b9
Ruby 1.9 compat: special-case String access methods to not depend on #chars
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8538 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2008-01-03 02:43:19 +00:00
David Heinemeier Hansson
6a6367d7d2
Fixed that you don't have to call super in ActionMailer::TestCase#setup ( closes #10406 ) [jamesgolick]
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8536 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2008-01-03 00:40:28 +00:00
David Heinemeier Hansson
64b4c18e15
Refactor check for local databases ( closes #10539 ) [parcelbrat]
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8535 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2008-01-03 00:35:23 +00:00
David Heinemeier Hansson
424c330634
Added by parameter to increment, decrement, and their bang varieties so you can do player1.increment!(:points, 5) ( closes #10542 ) [Sam]
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8534 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2008-01-03 00:30:22 +00:00
David Heinemeier Hansson
3229b59495
Fixed String#titleize to work for strings with 's too ( closes #10571 ) [trek]
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8533 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2008-01-03 00:16:47 +00:00
David Heinemeier Hansson
f5aaf945b6
Added that rails:update is run when you do rails:freeze:edge to ensure you also get the latest JS and config files ( closes #10565 ) [jeff]
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8532 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2008-01-03 00:14:47 +00:00
Rick Olson
0ad24df6ed
Optimize ActiveRecord::Base#exists? to use #select_all instead of #find. Closes #10605 [jamesh, fcheung, protocool]
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8531 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2008-01-02 21:39:49 +00:00
Rick Olson
744b1d7f4d
Fix atom_feed_helper to comply with the atom spec. Closes #10672 [xaviershay]
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8529 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2008-01-02 19:45:53 +00:00
Rick Olson
4261b837f5
Fix small documentation typo. Closes #10670 [l.guidi]
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8528 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2008-01-02 19:27:21 +00:00
Rick Olson
14f6440ed6
Correct indentation in a couple spots. Closes #10671 [l.guidi, rick]
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8527 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2008-01-02 19:24:44 +00:00
Jeremy Kemper
001fe6a435
Fix failing date helper test. Closes #10664 [Wesley Moxam]
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8526 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2008-01-02 18:09:52 +00:00
Jeremy Kemper
9a97f9a14b
find_or_create_resource_for handles module nesting. Closes #10646 .
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8525 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2008-01-02 09:14:34 +00:00
Jeremy Kemper
4e04ec4adb
Ruby 1.9 compat: fix two failing tests since String#each has been removed. Closes #10655 .
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8524 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2008-01-02 09:11:39 +00:00
Jeremy Kemper
ff47ba9adb
Ruby 1.9 compat: add #raise to AS::BasicObject, fixup Duration argument error. Closes #10594 .
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8523 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2008-01-02 09:08:14 +00:00
Jeremy Kemper
e21c48baf7
db:sessions:clear task uses session_table_name method. Closes #10631 [Cheah Chu Yeow]
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8522 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2008-01-02 09:03:56 +00:00
Jeremy Kemper
9def906fd0
Correct Hash#assert_valid_keys docs. Closes #10621 [Cheah Chu Yeow, blackanger]
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8521 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2008-01-02 09:01:19 +00:00
Jeremy Kemper
072b9d9fba
SQLite: db:drop:all doesn't fail silently if the database is already open. Closes #10577 .
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8519 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2008-01-02 08:28:58 +00:00
Jeremy Kemper
42622f23b4
Fix invalid time test. Closes #10632 [Dirkjan Bussink]
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8518 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2008-01-02 08:26:37 +00:00
David Heinemeier Hansson
438b108c6b
Changed the implementation of Enumerable#group_by to use a double array approach instead of a hash such that the insert order is honored [DHH/Marcel]
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8516 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2007-12-31 21:30:17 +00:00
Jeremy Kemper
07de7612bd
Don't make new_mongrel server default yet
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8511 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2007-12-29 19:43:39 +00:00
Jeremy Kemper
20d29b3797
Ruby 1.9 compat: introduce ActiveSupport::FrozenObjectError normalize TypeError vs RuntimeError handling. Closes #10645 [Frederick Cheung]
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8510 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2007-12-29 19:43:07 +00:00
Jeremy Kemper
1bb208d7e5
Fixup mocha tests for 0.5.6. Closes #10602 [murphy, mikong]
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8508 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2007-12-29 05:16:03 +00:00
Jeremy Kemper
07392bfe87
Ruby 1.9 compat: workaround module_eval bug. Closes #10641 [Frederick Cheung]
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8507 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2007-12-29 05:06:06 +00:00
Rick Olson
58cf6df41a
Fix that auto_link looks for ='s in url paths (Amazon urls have them). Closes #10640 [bgreenlee]
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8506 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2007-12-28 20:59:30 +00:00
Rick Olson
9e2536393e
remove multiple enumerations from ActiveSupport::JSON#convert_json_to_yaml when dealing with date/time values. [rick]
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8505 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2007-12-28 18:37:17 +00:00
Rick Olson
0e3a54a3b9
Don't unnecessarily load has_many associations in after_update callbacks. Closes #6822 [stopdropandrew, canadaduane]
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8504 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2007-12-28 18:01:22 +00:00
Rick Olson
e8730713d2
Allow setting ActiveResource::Base#format before #site. [rick]
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8503 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2007-12-28 17:12:35 +00:00
Rick Olson
c54b915825
Support agnostic formats when calling custom methods. Closes #10635 [joerichsen]
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8502 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2007-12-28 17:03:58 +00:00
Rick Olson
90d75e5109
inherit from the new ActiveSupport::BlankSlate class
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8501 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2007-12-28 17:02:01 +00:00
Jeremy Kemper
7bd33735d4
Introduce ActiveSupport::BasicObject which bridges Builder::BlankSlate and Ruby 1.9 BasicObject. Closes #10634 [Frederick Cheung]
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8500 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2007-12-28 11:14:18 +00:00
Jeremy Kemper
7555073803
Ruby 1.9 compat: introduce instance_variable_names. Closes #10630 [Frederick Cheung]
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8499 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2007-12-28 05:42:12 +00:00
Jeremy Kemper
16558f6dd8
Ensure that test case setup is run even if overridden. Closes #10382 .
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8497 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2007-12-28 05:21:24 +00:00
Jeremy Kemper
0c0610d398
Use extract_options! rather than Hash test + pop. Closes #10628 [ssoroka]
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8496 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2007-12-28 03:58:01 +00:00
Jeremy Kemper
57c613a601
Ruby 1.9 compat: calculations don't assume array implementation of ordered hash. References #1689 [Frederick Cheung]
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8494 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2007-12-27 11:18:30 +00:00
Jeremy Kemper
5162e31e5b
Ruby 1.9 compat: javascript proxy. References #1689 [Frederick Cheung]
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8493 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2007-12-27 11:18:11 +00:00
Jeremy Kemper
41c82e66c1
Ruby 1.9 compat: file uploads. References #1689 [Frederick Cheung]
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8492 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2007-12-27 11:17:53 +00:00
Jeremy Kemper
699cc15116
Move rubyforge task require
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8491 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2007-12-27 11:17:34 +00:00
Jeremy Kemper
05a4db5eca
Ruby 1.9 compat: don't use obsolete ParseDate
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8490 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2007-12-27 11:17:24 +00:00
Jeremy Kemper
d760d882d7
Move rubyforge task require
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8489 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2007-12-27 11:17:14 +00:00
Jeremy Kemper
e2d4ebdea4
Introduce native mongrel handler and push mutex into dispatcher.
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8488 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2007-12-27 11:17:05 +00:00
Jeremy Kemper
f013e047ef
Ruby 1.9 compat: don't modify iterator target within block
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8487 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2007-12-27 11:16:51 +00:00
Jeremy Kemper
240b4c527e
Ruby 1.9 compat: attribute methods
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8486 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2007-12-27 11:16:39 +00:00
Rick Olson
e781faddca
Fix HTML Sanitizer to allow trailing spaces in CSS style attributes. Closes #10566 [wesley.moxam]
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8485 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2007-12-23 21:07:20 +00:00
Jeremy Kemper
38f8252e2d
Remove leaky unused signal handler for transactions.
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8484 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2007-12-22 19:05:26 +00:00
Jeremy Kemper
fa906778ff
Integration tests use ActionController::Dispatcher rather than the old Dispatcher. Closes #10596 .
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8483 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2007-12-22 19:03:01 +00:00
Jeremy Kemper
c64a29f6f1
Ruby 1.9 compat: dependencies uses Module#local_constant_names. References #1689 [Frederick Cheung]
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8482 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2007-12-22 18:23:37 +00:00
Jeremy Kemper
8b5f4e474f
Ruby 1.9 compat: fix warnings, shadowed block vars, and unitialized instance vars
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8481 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2007-12-22 11:26:03 +00:00
Jeremy Kemper
dc901ced44
Ruby 1.9 compat: Fixtures inherits Hash instead of YAML::Omap since it's now insertion-ordered. Work around a &:procname crash.
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8480 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2007-12-22 08:28:57 +00:00
Jeremy Kemper
ef6784f761
Ruby 1.9 compat: initializer only sets kcode for Ruby < 1.9
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8479 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2007-12-22 04:50:27 +00:00
Jeremy Kemper
750f15bc26
Ruby 1.9 compat: Class#subclasses is now protected
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8478 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2007-12-22 04:50:12 +00:00
Jeremy Kemper
ca812785ec
Fold reset! into the run method directly. Make -n options compatible with Ruby 1.9 whose option parser seems to call the block with nil value even when the option is omitted.
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8477 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2007-12-22 04:49:56 +00:00
Jeremy Kemper
c9d313dc22
Request profiler resets after warmup and each run so you don't have to do it in your session script.
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8475 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2007-12-22 02:15:59 +00:00
Jeremy Kemper
a7027a94d4
Request profiler: use actual script path and line numbers for backtraces.
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8474 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2007-12-22 02:15:44 +00:00
Jeremy Kemper
a81333f115
Add :default option to time_zone_select. Closes #10590 .
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8473 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2007-12-21 22:18:07 +00:00
Jeremy Kemper
470fc02096
Document custom methods. Closes #10589 .
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8472 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2007-12-21 21:42:27 +00:00
Jeremy Kemper
a3bfb661e3
Update layout docs. Closes #10584 [Cheah Chu Yeow]
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8471 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2007-12-21 12:30:29 +00:00
Jeremy Kemper
0333190d1a
Rails 1.9 compat: asset tag helper tests
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8470 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2007-12-21 12:26:51 +00:00
Jeremy Kemper
99664d5444
Ruby 1.9: use enumerator for blockless Range#step
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8469 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2007-12-21 12:26:40 +00:00
Jeremy Kemper
7630b38e22
Ruby 1.9 compat: compiled templates test
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8468 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2007-12-21 12:26:27 +00:00
Jeremy Kemper
1f98bf101a
Ruby 1.9 compat: date helper
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8467 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2007-12-21 12:26:18 +00:00
Jeremy Kemper
5c4469f3a8
Ruby 1.9 compat: form helper test
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8466 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2007-12-21 12:26:08 +00:00
Jeremy Kemper
79790df40c
Ruby 1.9 compat: note failing form options helper test, probably in html-scanner
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8465 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2007-12-21 12:25:55 +00:00
Jeremy Kemper
a4c77f9bc4
Ruby 1.9 compat: text helper
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8464 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2007-12-21 11:51:17 +00:00
Jeremy Kemper
8931a6ec16
Ruby 1.9 compat: url helper encoding
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8463 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2007-12-21 11:51:01 +00:00
Jeremy Kemper
a1ec3aa6c0
Ruby 1.9 compatibility
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8462 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2007-12-21 11:22:03 +00:00
Jeremy Kemper
8e432d9a5b
Multibyte: skip String#each_char test for Ruby 1.9
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8461 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2007-12-21 11:21:54 +00:00
Jeremy Kemper
c95002c284
Multibyte: String#chars returns self for Ruby 1.9
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8460 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2007-12-21 11:21:43 +00:00
Jeremy Kemper
909b2c1acf
Multibyte: String#chars uses passthrough handler for Ruby 1.9
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8459 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2007-12-21 11:21:20 +00:00
Jeremy Kemper
2556e67403
App generate says sqlite3 is the default and mentions frontbase. Closes #10550 [Cheah Chu Yeow, Will Cannings]
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8457 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2007-12-21 03:39:25 +00:00
Jeremy Kemper
f6379bfe15
Eager belongs_to :include infers the foreign key from the association name rather than the class name. Closes #10517 .
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8456 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2007-12-21 01:49:01 +00:00
Jeremy Kemper
15b38efde8
Benchmark logs for any level below or equal to the one specified, rather than just equal. Closes #10580 [Dan Manges]
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8455 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2007-12-21 01:48:20 +00:00
Jeremy Kemper
43fdbd5e1f
Hash#symbolize_keys skips keys that can't be symbolized. Closes #10500 .
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8454 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2007-12-20 22:28:47 +00:00
Jeremy Kemper
b72763a96f
SQLite: fix rename_ and remove_column for columns with unique indexes. Closes #10576 .
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8453 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2007-12-20 22:28:12 +00:00
Jeremy Kemper
f16cd7220f
Ruby 1.9 compat: ENV.delete rather than assigning nil
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8452 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2007-12-20 22:27:37 +00:00
Rick Olson
5dc831fd9a
add passing test for Test::Unit subclasses running #setup properly [brynary]
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8445 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2007-12-19 22:49:27 +00:00
Jeremy Kemper
0b84af9599
Revert [8392]. Closes #10568 , reopens #10379 .
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8442 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2007-12-19 21:16:27 +00:00
Jeremy Kemper
40bff29889
Ruby 1.9 compat: join the buffer array explicitly rather than relying on to_s to flatten it
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8440 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2007-12-19 09:40:58 +00:00
Jeremy Kemper
b4e3b5d418
Ruby 1.9 compat: check column type more carefully
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8439 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2007-12-19 09:31:57 +00:00
Jeremy Kemper
7f53d0485f
RubyGems 0.9.5 compat: always set the gem platform
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8438 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2007-12-19 04:21:24 +00:00
Jeremy Kemper
d7515d4b09
Ruby 1.9 compat: use .to_a instead of .map which now returns an enumerator
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8437 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2007-12-19 04:21:12 +00:00
Jeremy Kemper
16c3ec7b28
Simplify some rails info methods
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8436 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2007-12-19 04:21:02 +00:00
Jeremy Kemper
11a75f9a38
Ruby 1.9 compat: Update idiosyncratic block variable usage. Closes #10546 .
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8435 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2007-12-19 01:18:45 +00:00
Jeremy Kemper
a5ca52f4a5
Missed commit. References #10554 .
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8434 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2007-12-18 21:26:01 +00:00
Jeremy Kemper
f91acf0258
Ruby 1.9 compat: move from the deprecated Base64 module to ActiveSupport::Base64. Closes #10554 .
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8433 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2007-12-18 21:14:07 +00:00
Jeremy Kemper
2bdac92dcf
Toplevel test task uses the same rake it was invoked with
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8432 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2007-12-18 21:12:45 +00:00
Jeremy Kemper
ab9e4c0eaa
Ruby 1.9 compatibility. References #1689 .
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8431 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2007-12-17 18:54:55 +00:00
David Heinemeier Hansson
0f6c86ff40
Added delete_via_redirect and put_via_redirect to integration testing ( closes #10497 ) [philodespotos]
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8429 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2007-12-17 00:39:19 +00:00
David Heinemeier Hansson
be0c45365c
Docfix ( closes #10369 ) [revans]
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8428 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2007-12-17 00:18:27 +00:00
David Heinemeier Hansson
dcc1549512
Fix rdoc task name ( closes #10392 ) [murphy]
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8427 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2007-12-17 00:16:15 +00:00
David Heinemeier Hansson
436da684dc
Allow headers[Accept] to be set by hand when calling xml_http_request ( closes #10461 ) [BMorearty]
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8426 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2007-12-17 00:10:18 +00:00
David Heinemeier Hansson
26e10218bc
Added OPTIONS to list of default accepted HTTP methods ( closes #10449 ) [holoway]
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8425 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2007-12-17 00:06:24 +00:00
David Heinemeier Hansson
c92a7cea05
Docfix ( closes #10493 )
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8424 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2007-12-16 23:59:23 +00:00
David Heinemeier Hansson
1aa456d26f
Fix doc ( closes #10526 )
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8423 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2007-12-16 23:55:22 +00:00
David Heinemeier Hansson
d6859a7216
Add tests for html_escape, and remove an unneeded backslash ( closes #10511 ) [fxn]
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8422 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2007-12-16 23:53:45 +00:00
David Heinemeier Hansson
56e646296a
Added option to pass proc to ActionController::Base.asset_host for maximum configurability ( closes #10521 ) [chuyeow]
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8421 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2007-12-16 23:50:02 +00:00
David Heinemeier Hansson
d7e6df43a9
Proper attribution in CHANGELOG
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8420 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2007-12-16 23:36:35 +00:00
David Heinemeier Hansson
69edebf0f1
Prepare for 2.0.2 release
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8419 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2007-12-16 23:30:30 +00:00
David Heinemeier Hansson
1427a49dc9
Doc fixing
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8418 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2007-12-16 23:27:05 +00:00
David Heinemeier Hansson
a50284d28f
Changed the default database from mysql to sqlite3, so now running "rails myapp" will have a config/database.yml thats setup for SQLite3 (which in OS X Leopard is installed by default, so is the gem, so everything Just Works with no database configuration at all). To get a Rails application preconfigured for MySQL, just run "rails -d mysql myapp" [DHH]
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8417 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2007-12-16 23:22:56 +00:00
David Heinemeier Hansson
d8f2fea813
Turned on ActionView::Base.cache_template_loading by default in config/environments/production.rb to prevent file system stat calls for every template loading to see if it changed (this means that you have to restart the application to see template changes in production mode) [DHH]
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8416 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2007-12-16 23:10:48 +00:00
Jeremy Kemper
7af985f74f
Update changelog for Ruby 1.9 compat patches
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8413 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2007-12-15 02:30:25 +00:00
Jeremy Kemper
6743504ba2
Revert const_missing bypass in favor of Duration constant lookup tweak
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8412 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2007-12-15 02:30:17 +00:00
Jeremy Kemper
3df9fb53ac
More changelog updates
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8411 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2007-12-15 02:30:04 +00:00
Jeremy Kemper
2f61985540
Mark that render tests crash Ruby 1.9
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8410 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2007-12-15 02:29:45 +00:00
Jeremy Kemper
ee0ea35d91
Ruby 1.9 compat: helpers
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8409 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2007-12-15 02:29:36 +00:00
Jeremy Kemper
525cac7f82
Note that filters test crashes Ruby 1.9
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8408 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2007-12-15 02:29:24 +00:00
Jeremy Kemper
a3143eaa98
Ruby 1.9 compat: account for new, non-flattening Array#to_s
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8407 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2007-12-15 02:29:15 +00:00
Jeremy Kemper
f85089aabb
Fixes for standalone tests
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8406 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2007-12-15 02:29:04 +00:00
Jeremy Kemper
11dde5ca2f
Ruby 1.9 compat: cookies
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8405 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2007-12-15 02:28:53 +00:00
Jeremy Kemper
2703d55935
Ruby 1.9 compat: use String#ord to escape filenames for compiled method names
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8404 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2007-12-15 02:28:42 +00:00
Jeremy Kemper
6d5ee8dab3
Ruby 1.9 compat: 'a'.ord == 'a'[0]
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8403 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2007-12-15 02:28:32 +00:00
Jeremy Kemper
aa4ad404c6
Ruby 1.9 compat: shadowed vars, kcode
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8402 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2007-12-15 02:28:20 +00:00
Jeremy Kemper
cefea3c677
Remove missing default helper warnings
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8401 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2007-12-15 02:28:06 +00:00
Jeremy Kemper
70117b0294
Introduce (in /Users/jeremy/rails/git/trunk) to output a crytographically secure secret key for use with cookie sessions.
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8400 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2007-12-15 02:27:56 +00:00
Jeremy Kemper
887870f20c
Ruby 1.9 compat: define Duration#== [chuyeow]
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8399 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2007-12-15 02:27:41 +00:00
Jeremy Kemper
bb152cd8ca
Ruby 1.9 compat: normalize date and time xmlschema to match Ruby's formatting [chuyeow]
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8398 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2007-12-15 02:27:29 +00:00
Jeremy Kemper
3d90733e93
Ruby 1.9 compat: prefer builtin String#starts_ and ends_with? if available [chuyeow]
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8397 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2007-12-15 02:27:11 +00:00
Jeremy Kemper
8d8b573275
Bypass const_missing lookup for toplevel constants. Optimizes for Ruby 1.9 const_defined.
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8396 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2007-12-15 02:12:39 +00:00
Rick Olson
ce102e3af9
Ensure optimistic locking handles nil #lock_version values properly. Closes #10510 [rick]
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8395 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2007-12-15 01:45:30 +00:00
Rick Olson
abd7cf343c
Make the Fixtures Test::Unit enhancements more supporting for double-loaded test cases. Closes #10379 [brynary]
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8392 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2007-12-15 01:23:05 +00:00
David Heinemeier Hansson
1ceccdeb7f
Added more specific exceptions for 400, 401, and 403 (all descending from ClientError so existing rescues will work) ( closes #10326 ) [trek]
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8390 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2007-12-14 23:09:46 +00:00
David Heinemeier Hansson
f5c17790e1
We love whitespace
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8389 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2007-12-14 22:52:35 +00:00
David Heinemeier Hansson
f60e3aa1ae
Fixed that local database creation should consider 127.0.0.1 local ( closes #9026 ) [parcelbrat]
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8388 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2007-12-14 22:32:54 +00:00
David Heinemeier Hansson
519c5c7547
Docfix ( closes #10429 ) [jamesh/ssoroka]
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8387 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2007-12-14 18:12:08 +00:00
David Heinemeier Hansson
3486d54007
Fixed that functional tests generated for scaffolds should use fixture calls instead of hard-coded IDs ( closes #10435 ) [boone]
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8386 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2007-12-14 18:09:14 +00:00
David Heinemeier Hansson
78727dd8e2
Fixed that ActionView#file_exists? would be incorrect if @first_render is set ( closes #10569 ) [dbussink]
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8385 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2007-12-14 18:07:20 +00:00
David Heinemeier Hansson
7a224356a8
Added that Array#to_param calls to_param on all it's elements ( closes #10473 ) [brandon]
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8384 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2007-12-14 18:02:04 +00:00
David Heinemeier Hansson
3aa54c5e44
Added db:migrate:redo and db:migrate:reset for rerunning existing migrations #10431 , ( closes #10432 ) [matt]
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8383 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2007-12-14 17:51:02 +00:00
David Heinemeier Hansson
9187ed8656
Added db:migrate:redo for rerunning existing migrations ( closes #10431 ) [matt]
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8382 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2007-12-14 17:47:56 +00:00
Marcel Molina
9661395d38
Remove references to nonexistent :joins documentation. Closes #10498 [tpope]
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8381 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2007-12-13 19:51:44 +00:00
Marcel Molina
0c6150abbc
Make the routes rake task more discoverable but documenting it in the routing documentation. Closes #10478 [dancroak]
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8380 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2007-12-13 18:21:19 +00:00
Marcel Molina
8945ea9ba2
Document what to pass the :accept option for validates_acceptance_of when mapping the attribute to an actual column (rather than a virtual one). Closes #10491 [xaviershay]
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8379 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2007-12-13 03:33:54 +00:00
Marcel Molina
b4dd1e6879
Explain how the layout macro behaves when passed a path that contains a directory. Closes #10492 [loincloth]
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8378 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2007-12-13 03:33:06 +00:00
Rick Olson
d98728e091
Fix that validates_acceptance_of still works for non-existent tables (useful for bootstrapping new databases). Closes #10474 [hasmanyjosh]
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8377 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2007-12-12 23:55:14 +00:00
Rick Olson
66e97c34c1
Ensure that the :uniq option for has_many :through associations retains the order. #10463 [remvee]
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8376 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2007-12-11 20:08:30 +00:00
Jeremy Kemper
f67add4283
Base.exists? doesn't rescue exceptions to avoid hiding SQL errors. Closes #10458 .
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8375 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2007-12-11 01:53:54 +00:00
Jeremy Kemper
9aca06fbee
More Action View refactoring. Knock :erb default down a notch. Closes #10455 .
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8374 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2007-12-10 23:14:47 +00:00
Jeremy Kemper
18344e9b0e
Missed commit. Closes #10437 .
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8373 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2007-12-10 22:36:11 +00:00
Jeremy Kemper
93ec552e9b
Fix up template handler tests. Closes #10437 .
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8372 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2007-12-10 20:41:59 +00:00
Marcel Molina
fade31ad05
Remove references to ActsAs* from the README now that it's been pulled out into a plugin. Closes #10451 [sjgman9]
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8371 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2007-12-10 19:45:14 +00:00
Jeremy Kemper
dc3e55d117
TimeZone#to_s uses UTC rather than GMT. References #1689 .
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8370 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2007-12-10 10:08:07 +00:00
Jeremy Kemper
bcbcc0260b
Ruby 1.9 compat: TimeZone avoids localtime conversion. References #1689 [Chu Yeow]
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8369 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2007-12-10 10:05:43 +00:00
Jeremy Kemper
d0b5f640f2
Fix javascript_tag method name collision. Closes #10337 .
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8368 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2007-12-10 09:12:50 +00:00
Jeremy Kemper
4b055a4a6a
Update destroy_all and delete_all documentation to better describe their tradeoffs. Closes #10447 .
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8367 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2007-12-10 09:12:18 +00:00
Jeremy Kemper
9208390f32
Ensure asset cache directories are automatically created. Closes #10337 .
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8366 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2007-12-10 06:09:30 +00:00
Jeremy Kemper
b1ce7e4d4a
Ruby 1.9 compat: File.exists\? -> File.exist\? en masse. References #1689 [Pratik Naik]
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8365 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2007-12-10 05:54:46 +00:00
Jeremy Kemper
c81fff2468
Correct empty response handling. Closes #10445 .
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8364 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2007-12-10 05:53:56 +00:00
Jeremy Kemper
83b0204138
Ruby 1.9 compat. References #1689 [Pratik Naik]
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8363 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2007-12-10 05:12:50 +00:00
Jeremy Kemper
73673256ac
Document Active Record exceptions. Closes #10444 .
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8362 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2007-12-10 04:13:33 +00:00
Jeremy Kemper
ed6949b2d7
Remove unused ConnectionFailed exception
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8361 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2007-12-10 03:34:05 +00:00
Jeremy Kemper
902db5ed0a
Credit #10443 + more changelog updates
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8360 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2007-12-10 03:25:08 +00:00
Jeremy Kemper
80cf698b7b
More changelog updates
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8359 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2007-12-10 03:19:56 +00:00
Jeremy Kemper
9ccbb13563
Allow double quotes around RAILS_GEM_VERSION also. Closes #10443 [James Cox]
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8358 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2007-12-10 03:19:27 +00:00
Jeremy Kemper
33e9876c00
More changelog updates
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8357 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2007-12-10 03:19:17 +00:00
Jeremy Kemper
f6d45ce95d
Fix strange NoMemoryError on amd64. Closes #10442 [wrb]
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8355 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2007-12-10 02:45:13 +00:00
Jeremy Kemper
836f32cf7d
Axe outdated :ar_joins commentary
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8354 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2007-12-10 01:48:14 +00:00
Jeremy Kemper
d0f192cd75
Remove empty ar_joins_test
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8353 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2007-12-10 01:37:11 +00:00
Jeremy Kemper
e8a85924a3
lifo -> Pratik
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8352 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2007-12-10 01:29:20 +00:00
Jeremy Kemper
e69a636349
More contributor name updates
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8351 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2007-12-10 01:16:00 +00:00
Jeremy Kemper
380ddd5310
Document how to disable forgery protection for tests. Useful note for those upgrading from 1.x. Closes #10440 [Trevor Turk]
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8350 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2007-12-10 01:15:30 +00:00
Jeremy Kemper
a93fea800f
Update Chu's name in changelogs
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8349 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2007-12-10 01:07:49 +00:00
Jeremy Kemper
c92c8c0b28
Update Fred's name in changelogs
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8348 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2007-12-10 01:07:34 +00:00
Jeremy Kemper
220a64e9b6
post.comments.reload returns the association rather than the result of load_target. Closes #10438 [Fred Cheung]
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8347 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2007-12-10 01:07:04 +00:00
Jeremy Kemper
a3e57ad11e
Fix doc typo on Dispatcher.dispatch. Closes #10434 [fxn]
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8346 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2007-12-10 00:52:38 +00:00
Jeremy Kemper
1542886e40
Document the validates class method. Closes #10216 [Farley Knight]
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8345 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2007-12-10 00:47:55 +00:00
Jeremy Kemper
62ddeaf052
Missed commit. References #10395 .
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8344 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2007-12-09 23:02:50 +00:00
Jeremy Kemper
2d2fd67b51
Move #to_query methods where they ought to belong. Closes #10395 [Chu Yeow]
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8343 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2007-12-09 22:12:07 +00:00
Jeremy Kemper
bafd698acb
render :xml and :json preserve custom content types. Closes #10388 .
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8342 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2007-12-09 22:11:37 +00:00
Jeremy Kemper
3fab196da3
Refactor Action View template handlers. Closes #10437 .
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8341 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2007-12-09 22:11:11 +00:00
Jeremy Kemper
ef57b93a82
to_sentence returns self[0].to_s instead of just self[0] for arrays of length 1. Closes #10390 [Chu Yeow, mrj]
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8340 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2007-12-09 22:10:40 +00:00
Jeremy Kemper
77de690a56
Be careful not to reference ActiveRecord if it isn't loaded, fixing rake test when you're working without a database. [eedn]
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8339 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2007-12-09 04:37:46 +00:00
Jeremy Kemper
2c951efed3
Don't check for pending migrations if Active Record isn't loaded
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8338 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2007-12-09 04:18:28 +00:00
Jeremy Kemper
a456388ff9
Update rails:freeze:gems to work with RubyGems 0.9.5.
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8336 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2007-12-09 01:20:24 +00:00
Rick Olson
37b874bb4d
Fix DoubleRenderError message and leave out mention of returning false from filters. Closes #10380 [fcheung]
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8335 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2007-12-08 19:32:10 +00:00
Rick Olson
d1c6349e58
Clean up some cruft around ActionController::Base#head. Closes #10417 [ssoroka]
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8334 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2007-12-08 19:23:03 +00:00
Rick Olson
b30de6039d
Refactor of Hash#symbolize_keys! to use Hash#replace. Closes #10420 [ReinH]
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8333 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2007-12-08 00:19:37 +00:00
Rick Olson
4dcd4069f5
Fix HashWithIndifferentAccess#to_options! so it doesn't clear the options hash. Closes #10419 [ReinH]
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8332 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2007-12-08 00:12:52 +00:00
David Heinemeier Hansson
1acd54a5b4
Make ready for 2.0.1
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8330 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2007-12-07 13:37:13 +00:00
David Heinemeier Hansson
7f02cdd4a0
Removed query cache rescue as it could cause code to be run twice ( closes #10408 ) [DHH]
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8329 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2007-12-07 13:34:06 +00:00