José Valim
d2e7c1b97d
Raise an error if respond_with is invoked and no format is declared.
2010-01-10 20:21:08 +01:00
José Valim
8d72ba51ba
Ensure nested namespaces work as expected.
2010-01-10 18:42:45 +01:00
Joao Carlos
36969c6ecd
Fixes namespaced routes [ #3673 status:resolved]
...
Signed-off-by: José Valim <jose.valim@gmail.com>
2010-01-10 12:49:31 +01:00
David Heinemeier Hansson
d4589e96ef
Fixed that PrototypeHelper#update_page should return html_safe [DHH]
2010-01-08 13:46:30 -08:00
David Heinemeier Hansson
188d52165b
Fixed that much of DateHelper wouldn't return html_safe? strings [DHH]
2010-01-08 11:49:12 -08:00
David Heinemeier Hansson
5ea130943e
Fixed that fragment caching should return a cache hit as html_safe (or it would all just get escaped) [DHH]
2010-01-07 17:45:32 -08:00
José Valim
3b631df101
Ensure that segments in default_url_options also work with format specified.
2010-01-07 17:17:06 +01:00
José Valim
f149eb19d4
From now on, parameters defined in default_url_options can be absent from named routes.
...
This allows the following setup to work:
# app/controllers/application_controller.rb
class ApplicationController
def default_url_options(options=nil)
{ :locale => I18n.locale }
end
end
# From your views and controllers:
I18n.locale #=> :en
users_url #=> "/en/users"
users_url(:pl) #=> "/pl/users"
user_url(1) #=> "/en/users/1"
user_url(:pl, 1) #=> "/pl/users/1"
user_url(1, :locale => :pl) #=> "/pl/users/1"
If you provide all expected parameters, it still works as previously.
But if any parameter is missing, it tries to assign all possible ones
with the hash returned in default_url_options or the one passed straight
to the named route method.
Beware that default_url_options in ApplicationController is not shared
with ActionMailer, so you are required to always give the locale in your
email views.
2010-01-07 15:34:14 +01:00
José Valim
f564f947d9
Remove duplicated url_for code and move methods shared between ActionMailer and ActionController up to AbstractController.
2010-01-07 15:31:50 +01:00
José Valim
598456b68b
Updated the documentation for helpers.label.
2010-01-07 15:31:50 +01:00
José Valim
c68cc49dcd
Use helpers.label instead of views.labels.
2010-01-07 15:31:50 +01:00
José Valim
a091e2e4f6
errors in ActionView should not be namespaced as well.
2010-01-07 15:31:50 +01:00
José Valim
0d5ce7c525
namespace in routes changes both the path and name prefix.
2010-01-06 09:51:46 +01:00
José Valim
e4099c2ad3
Allow named routes to be debugged.
2010-01-06 09:32:29 +01:00
José Valim
10389a4c29
Ruby 1.9.1 requires hash given to foormat to contain symbols.
2010-01-06 00:42:58 +01:00
José Valim
0cf190001e
Remove CGI.escape in function of Rack::Mount.escape
2010-01-06 00:33:17 +01:00
José Valim
e55d70a380
redirect in routes takes port into account [ #3653 status:resolved]
2010-01-05 23:40:56 +01:00
Joshua Peek
b3900a29eb
All router redirect helper to accept a full URI [ #3653 state:resolved]
2010-01-05 12:00:38 -06:00
Joshua Peek
8ff4faf66a
assert_template depends on AV::Template monkey patches in action_view/test_case
2010-01-05 11:48:06 -06:00
David Heinemeier Hansson
2dc5aeed6d
NumberHelper#number_to_currency should output html_safe strings so the units are not escaped
2010-01-05 08:22:17 -08:00
Jeremy Kemper
5c527c2f61
Controller tests should always require view tests since they add behavior controllers expect
2010-01-04 19:44:27 -08:00
Joshua Peek
3f28e0bda6
Trash string coercion rack hacks
2010-01-04 19:46:21 -06:00
Joshua Peek
76b5f18feb
Default middleware stack needs to be available at configuration time
2010-01-04 19:40:16 -06:00
Joshua Peek
2601a16ede
Autoload AS test case
2010-01-04 16:22:46 -06:00
Joshua Peek
cf83a6f16b
Autoload AC and AV test case classes
2010-01-04 16:22:46 -06:00
José Valim
562a00ba16
@_formats initialization should be AbstractController::Base.
2010-01-04 23:05:28 +01:00
José Valim
bd729344a7
Remove deprecated formatted named routes
2010-01-04 23:05:27 +01:00
Zach Brock
79438b4638
adding fix for auto linking to master too
...
Signed-off-by: Michael Koziarski <michael@koziarski.com>
2010-01-05 10:57:20 +13:00
David Heinemeier Hansson
5e94d3e3ea
Merge
2010-01-03 22:27:28 -08:00
David Heinemeier Hansson
090d12b49b
Added that ActionController::Base now does helper :all instead of relying on the default ApplicationController in Rails to do it [DHH]
2010-01-03 21:32:02 -05:00
José Valim
3990310a2b
Use underscore in notification namespaces.
2010-01-04 00:03:56 +01:00
José Valim
53c6984944
Add notifications to ActionDispatch::ShowExceptions, this can be used as hooks for plugins like ExceptionNotifier.
2010-01-03 23:33:34 +01:00
José Valim
6fbe9ef2ff
Use namespaces in notifications.
2010-01-03 20:39:42 +01:00
Stefan Penner
d531cbc809
fixed missing or incorrect session data error message
2010-01-02 23:01:06 -08:00
Mikel Lindsaar
42aa9b87c2
Silence warnings
2010-01-02 22:39:00 -08:00
José Valim
f50bb48e04
Do not enforce human_attribute_name as required API.
2010-01-02 22:27:03 +01:00
Carsten Gehling
bef968d379
I18n label helper [ #745 status:resolved]
...
Signed-off-by: José Valim <jose.valim@gmail.com>
2010-01-02 22:27:02 +01:00
José Valim
50aa876f32
Make rendering in ActionView happen through _render_template, as the rendering which comes from ActionController.
2009-12-31 18:40:20 -08:00
José Valim
c03c40b481
Expose a _render_partial hook as thhe _render_template one and make use of it.
2009-12-31 18:40:20 -08:00
José Valim
33c98b15bc
ActionController::Logger should include AbstractController::Logger and sort autoloads for easier readability.
2009-12-31 18:40:20 -08:00
José Valim
38fa0d14a8
controller_path is required by ActionView, so move it up to AbstractController and refactor AbstractController::Layouts.
2009-12-31 18:40:20 -08:00
Carl Lerche
ae7ada1fde
Some railties cleanup:
...
* Rename <framework>/rails.rb -> <framework>/railtie.rb
* Rails::Plugin -> Rails::Railtie
* Rails::Plugin::Vendored -> Rails::Plugin
2009-12-31 13:12:52 -08:00
Carl Lerche
e749424dfa
Rename rails.rb -> rails/all.rb and rails/core.rb -> rails.rb
2009-12-31 13:12:52 -08:00
Carl Lerche
a23f4b6aee
Add a /rails.rb for each framework for consistency
2009-12-31 11:57:59 -08:00
Jeremy Kemper
1fbd02e446
Revert "Add config.action_controller.include behavior to plugins."
...
This reverts commit 7e8b7f46bfc086a36db996420fbee93348c5268e.
Conflicts:
railties/lib/rails/plugin.rb
2009-12-30 19:34:15 -08:00
Jeremy Kemper
8ad9d14494
Partially revert "ActionDispatch should require as little of ActiveSupport as possible"
...
Removes load path change from commit bb153f42e45160c5ef3593c393db5d3c6857fb70.
2009-12-30 17:35:17 -08:00
Carl Lerche
bb153f42e4
ActionDispatch should require as little of ActiveSupport as possible
2009-12-30 12:58:40 -08:00
Carl Lerche
2e87196d14
Use extlib_inheritable_accessor in request_forgery_protection.rb.
...
For some reason the current class_inheritable_accessor does not play nice with included hooks. class_inheritable_accessor will be revised shortly.
2009-12-29 13:21:36 -08:00
Yehuda Katz
cf4978313b
Make sure evalled method knows where it came from
2009-12-29 01:04:32 -08:00
Jeremy Kemper
f79caa49fb
Complain if there's no such middleware
2009-12-28 20:24:28 -08:00