José Valim
525382f638
Clean up Mime::Type and remove deprecated stuff (from 2.3).
2010-03-20 00:28:27 +01:00
wycats
995f57033f
We seem to have removed the URL helpers from ActionView subclasses...
2010-03-18 22:21:25 -07:00
Carlhuda
a5d80f84d2
Each controller class has it's own view context subclass. This removes the need for ActionView::Base.for_controller
2010-03-18 18:14:54 -07:00
Carlhuda
71c9337f45
All tests pass without memoizing view_context
2010-03-18 15:52:43 -07:00
Mathias Biilmann Christensen
c8dd6f224c
Deleting and setting a cookie in the same request was broken
...
Made sure to remove a cookie from @deleted_cookies when set
[#4211 state:committed]
Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net >
2010-03-17 18:04:32 -07:00
Carlhuda
0e15f07b75
Get modules back into integration tests
2010-03-17 17:52:21 -07:00
Mathias Biilmann Christensen
6c0c0f41a3
Fix for missing dependency in ActionDispatch::Integration
...
When running cucumber features from a new rails 3 app requiring
'cucumber/rails/world' would raise:
uninitialized constant ActionDispatch::Integration::Session::Test (NameError)
Fixed by requiring 'test/unit/assertions' in action_dispatch/integration
Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net >
2010-03-17 16:53:42 -07:00
Carlhuda
947f86c699
Modify assert_template to use instrumentation
2010-03-17 14:29:18 -07:00
Joshua Peek
13a783672a
Install url helpers on module instance so they can be accessed
...
globally
2010-03-17 16:05:29 -05:00
wycats
cd9ffd11e1
Eliminate warnings for AM on 1.8
2010-03-16 23:24:00 -07:00
wycats
c738812415
Another missing require
2010-03-16 21:37:54 -07:00
wycats
7c49b1adbb
Make sure options[:anchor] is correct in shorthand cases
2010-03-16 17:29:11 -07:00
Carl Lerche
23b6def0eb
Do not always include the named URL helpers into AC::Base and AV::Base.
2010-03-16 15:47:49 -07:00
Carl Lerche
3abf5ad7f8
Make RouteSet#finalize! a NOOP if it's been called already. Call finalize! the first time call() and url_for() are called if the RouteSet has not been finalized yet.
2010-03-16 15:47:48 -07:00
Jeremy Kemper
2a50eabf45
Integration test url options should account for :protocol not just https?
2010-03-15 19:52:41 -07:00
Jeremy Kemper
1f5e2f2bad
Revert "Reinstate old default_url_options method signature"
...
This reverts commit 5913dd4781 .
2010-03-15 16:49:03 -07:00
Jeremy Kemper
5913dd4781
Reinstate old default_url_options method signature
2010-03-15 15:54:37 -07:00
Andrew White
96bc6bcfee
Don't force singularization of singleton resource names, e.g. /preferences [ #4089 state:resolved]
...
Signed-off-by: Joshua Peek <josh@joshpeek.com >
2010-03-15 09:45:29 -05:00
José Valim
84f6da45a1
Merge branch 'master' of gitproxy:rails/rails
2010-03-10 22:17:44 +01:00
José Valim
ec0973c2ab
Remove uneeded methods.
2010-03-10 16:44:24 +01:00
Joshua Peek
dcd110c724
skip_relative_url_root url_for option is dead
2010-03-09 21:25:09 -06:00
Joshua Peek
1cc2a61ea6
Allow default_url_options to be set on route set
2010-03-09 21:20:13 -06:00
Joshua Peek
4d2470f7da
RouteSet#rewrite => url_for
2010-03-09 21:00:24 -06:00
Joshua Peek
e38ea982ff
Unused RouteSet#url_for is hogging a good method name
2010-03-09 20:57:43 -06:00
Joshua Peek
7db80f87e9
Move AC::UrlRewriter onto route set
2010-03-09 20:50:35 -06:00
wycats
9444ac9312
Refactor the RouteSet so it uses a Generator object instead of one huge method.
2010-03-09 10:20:56 -08:00
Jeremy Kemper
c507e16dba
Reinstate default_url_options and remove url_options= writer
2010-03-08 21:40:45 -08:00
Jeremy Kemper
514d3a47f4
Remove outdated, distracting commented code
2010-03-08 21:40:18 -08:00
wycats
e4558e0dbf
Now that class_attribute creates an instance method, remove it to avoid deprecation warnings ;)
2010-03-08 18:48:58 -08:00
Carlhuda
056042eb82
Simplify the action endpoint:
...
* Remove ActionEndpoint in favor of passing a block to MiddlewareStack
* Always create a Request; the performance win of RackDelegation is around
the response; the Request object hit is limited to a single object allocation
* #dispatch takes a Request
2010-03-08 16:50:00 -08:00
Carlhuda
146a5305d5
Add memoizing to AD::Request
2010-03-08 16:50:00 -08:00
Carl Lerche
8e9d9232b0
Require 'active_support/core_ext/hash/except' in the router.
2010-03-08 14:36:05 -08:00
Carlhuda
0045f37681
Whoops. We meant to switch from returning to tap, not vice versa
2010-03-08 12:30:51 -08:00
Carlhuda
f38e2e0335
Add support for mount RackApp, :at => "/sprockets" with a shorthand of mount Sprockets => "/sprockets".
...
This is different from the match syntax in that it cannot be used for controller/action and it does not
assume an anchor at the end of the match.
For instance, in the above example, if the client asked for "/sprockets/foo.js", the Sprockets app would
have a SCRIPT_NAME of "/sprockets" and PATH_INFO of "/foo.js".
2010-03-08 12:26:18 -08:00
Jan De Poorter
dfc7ff6429
Make sure nested singular resources get the correct name
...
[#3911 state:committed]
Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net >
2010-03-07 14:36:26 -08:00
wycats
39d6f9e112
Make many parts of Rails lazy. In order to facilitate this,
...
add lazy_load_hooks.rb, which allows us to declare code that
should be run at some later time. For instance, this allows
us to defer requiring ActiveRecord::Base at boot time purely
to apply configuration. Instead, we register a hook that should
apply configuration once ActiveRecord::Base is loaded.
With these changes, brings down total boot time of a
new app to 300ms in production and 400ms in dev.
TODO: rename base_hook
2010-03-07 06:24:30 -08:00
Jeremy Kemper
a82cf0a932
Tweak default_url_options deprecation warning
2010-03-05 12:17:23 -08:00
Carl Lerche
57cf1c578a
Remove the ability to set the mountpoint when initializing a route set.
2010-03-04 22:17:25 -08:00
Carl Lerche
9a17416d8b
Tweak out url_for uses :script_name and add some tests
2010-03-04 22:00:30 -08:00
Carl Lerche
48672cd199
Have ActionDispatch::Routing::RouteSet.new ready to receive routes as is.
2010-03-04 21:40:26 -08:00
Carlhuda
900a2d304a
Get rid of relative_url_path in favor of respecting SCRIPT_NAME. Also added a way to specify a default SCRIPT_NAME when generating URLs out of the context of a request.
2010-03-04 17:43:46 -08:00
Carlhuda
e311622e7b
Deprecated ActionController::Base.session_options= and ActionController::Base.session_store= in favor of a config.session_store method (which takes params) and a config.cookie_secret variable, which is used in various secret scenarios. The old AC::Base options will continue to work with deprecation warnings.
2010-03-04 16:05:52 -08:00
Carlhuda
1776969627
Move session and session_store onto ActionDispatch and add deprecation warnings
2010-03-04 11:58:30 -08:00
Carlhuda
52efbdcdef
Add caller to request_uri deprecation notice
2010-03-03 21:24:00 -08:00
Carlhuda
93422af5d5
Move remote_ip to a middleware:
...
* ActionController::Base.ip_spoofing_check deprecated => config.action_dispatch.ip_spoofing_check
* ActionController::Base.trusted_proxies deprecated => config.action_dispatch.trusted_proxies
2010-03-03 21:24:00 -08:00
Carl Lerche
9a9caf646d
Add a BlockUntrustedIps middleware
2010-03-03 21:24:00 -08:00
Carl Lerche
fb14b8c6fd
ActionDispatch::Request deprecates #request_uri
...
* Refactored ActionPatch to use fullpath instead
2010-03-03 21:24:00 -08:00
Carl Lerche
c92d598abf
Rack::Request actually defines #query_string
2010-03-03 21:23:59 -08:00
Carlhuda
5e0a05b8cb
Tweak the semantic of various URL related methods of ActionDispatch::Request
2010-03-03 21:23:34 -08:00
Jeremy Kemper
9f83cdc38e
No longer add missing leading / on path args to assert_redirected_to. Deprecated in 2.3.6.
2010-03-02 14:16:25 -08:00