Commit Graph

4688 Commits

Author SHA1 Message Date
José Valim
8b9bff9557 Small tweaks in ActionController subscriber messages format. 2010-01-15 12:24:31 +01:00
José Valim
8c8942ed4f Move Dispatcher setup to Railties and add instrumentation hook. 2010-01-15 12:24:30 +01:00
Joshua Peek
be968ecd8b Respect resources_path_names and :path_names options in new dsl 2010-01-13 20:26:01 -06:00
Joshua Peek
0f51e45307 optimise_named_routes is unnecessary 2010-01-13 20:22:53 -06:00
José Valim
9038a4af35 Add documentation to f.submit and make scaffold generators use the new shortcut. 2010-01-14 02:02:07 +01: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
José Valim
d382e93d8f Improve ActionPack logger output. 2010-01-11 23:38:17 +01:00
José Valim
a9eebde856 Merge branch 'master' of git://github.com/rails/rails 2010-01-11 15:18:24 +01:00
José Valim
0a8004efd2 Provide useful information when instrumenting partials. 2010-01-11 10:21:15 +01:00
Joshua Peek
02bbde4e78 Cleanup junk metal and revise API
API Change: Returning a "X-Cascade: pass" header triggers the cascade
instead of a 404 response.
2010-01-10 23:09:10 -06: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
David Heinemeier Hansson
5ddc597066 Use safe_concat instead of trying to html_safe! what might be a frozen string 2010-01-10 18:13:43 -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
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
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