Joshua Peek
0f51e45307
optimise_named_routes is unnecessary
2010-01-13 20:22:53 -06:00
José Valim
35933822de
Ensure optional path scopes are properly handled.
2010-01-14 01:31:17 +01:00
Stephen Celis
2835ec6134
Custom 'type' attribute support for text_field. [ #3646 status:resolved]
...
Signed-off-by: José Valim <jose.valim@gmail.com>
2010-01-14 01:07:04 +01:00
José Valim
214b548485
Make check boxes accept :multiple as option so they can handle collections (such as HABTM).
2010-01-14 01:07:03 +01:00
José Valim
d50bf47b00
Call :to_model before working with the object.
2010-01-14 01:07:03 +01:00
Carlos Antonio da Silva
8e0208f650
Add possibility to use i18n translatios in submit FormHelper.
...
Signed-off-by: José Valim <jose.valim@gmail.com>
2010-01-14 01:07:03 +01:00
José Valim
f921ad5c97
Tidy up ActiveRecord and Views runtime information on process action logger.
2010-01-14 01:07:03 +01:00
Joshua Peek
d01716731b
Add router support for resources :only and :except actions
2010-01-13 17:23:14 -06:00
Joshua Peek
5d787590f2
Cool this routing test passes now
2010-01-13 16:42:47 -06:00
Joshua Peek
bf9b81e2cb
Pass :as to resources to change the resource name
2010-01-13 12:18:06 -06:00
Joshua Peek
521ef3c40f
Passing in a crud action overloads the default action instead of creating a
...
new member action.
2010-01-13 11:45:27 -06:00
José Valim
01839834fd
ControllerRuntime tests also use Rails::Subscriber::TestHelper.
2010-01-13 01:19:24 +01:00
José Valim
b0d35ad00c
Test fragment/page cache and send data/file notifications.
2010-01-13 01:19:24 +01:00
José Valim
da5978c223
Add subscriber for ActionPack and move all logging inside it.
2010-01-13 01:19:23 +01:00
David Heinemeier Hansson
2c2b84f93c
Javascript tests expects the old default of escaping HTML, make it so for now
2010-01-10 18:25:17 -08:00
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
188d52165b
Fixed that much of DateHelper wouldn't return html_safe? strings [DHH]
2010-01-08 11:49:12 -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
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
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
3f28e0bda6
Trash string coercion rack hacks
2010-01-04 19:46:21 -06:00
Joshua Peek
e5ed62deea
Autoload AR test case
2010-01-04 16:50:01 -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
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
José Valim
f2d276fefd
Ensure no notification is on the queue before running notifications related tests.
2010-01-03 23:39:09 +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
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
Jeremy Kemper
db49b7dc94
Fix new year heisenbug
2009-12-31 18:32:16 -08:00
Jeremy Kemper
c4c2502df8
Fix controller runtime test
2009-12-30 22:15:02 -08:00
José Valim
4ecdf24bde
Kick AR logging back to life and move ControllerRuntime inside ActiveRecord::Rails.
2009-12-30 13:07:48 +01:00
Yehuda Katz
12e43494a7
Merge remote branch 'jose/perf'
2009-12-27 14:36:59 -08:00
David Heinemeier Hansson
95762cbbb3
Added shorthand for match 'products/overview' that expands to match 'products/overview', :to => 'products#overview', :as => 'products_overview'
2009-12-27 14:13:03 -08:00
José Valim
75ba102a80
Remove ActionView inline logging to ActiveSupport::Notifications and create ActionController::Base#log_event, so everything can be logged within one listener. Also expose log_process_action as a hook for different modules to include their own information during the action processing. This allow ActiveRecord to hook and any other ORM. Finally, this commit changes 'Processing' and 'Rendering' in logs to 'Processed' and 'Rendered' because at the point it's logged, everying already happened.
2009-12-26 20:28:53 +01:00
Joshua Peek
f53c36350d
Expect Rack 1.1
2009-12-26 13:25:35 -06:00
David Heinemeier Hansson
a8f1ee5986
Fix tests
2009-12-25 10:04:26 -08:00
David Heinemeier Hansson
38af368360
Merge
2009-12-24 15:24:57 -08:00
David Heinemeier Hansson
2b7256a42e
Extract Mapping class from monster match method
2009-12-24 15:23:39 -08:00
Sam Ruby
aa3565f3a6
Allow named_routes to be used with root, and with new DSL short-form.
...
The real use case it to make all of the following act the same:
root 'store#index', :as => 'store'
match '/' => 'store#index', :as => 'store'
match '/', :to => 'store#index', :as => 'store'
The test case provided deviates from this in order to demonstrate all three
forms in a single set of test routes.
Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net>
2009-12-23 20:55:21 -08:00
Jeremy Kemper
4d3602a8c4
Routing: fix that route shorthand shouldn't ignore other options. Raise if :as option is given to root method since its name is always 'root'
2009-12-23 17:42:30 -08:00
Jeremy Kemper
24e1b55608
Fix bare string Rack response bodies
2009-12-23 13:06:53 -08:00