Commit Graph

2744 Commits

Author SHA1 Message Date
José Valim
ece157e950 Move verification to a plugin as well: http://github.com/rails/verification.git 2010-04-10 11:47:20 +02:00
José Valim
cd79a46174 Remove input, form, error_messages_for and error_message_on from the framework. If you think you will miss them, feel free to use the dynamic_form plugin available at http://github.com/rails/dynamic_form 2010-04-10 10:53:05 +02:00
Jeremy Kemper
7353fc1595 Dial back from 'namespace :controller => ...' to 'scope :module => ...' 2010-04-09 23:09:15 -07:00
Jeremy Kemper
561d9eff0c Add test showing root match in path namespace 2010-04-09 22:12:06 -07:00
Jeremy Kemper
ac0280c39d Routes can be selectively namespaced by path or controller module 2010-04-09 21:48:35 -07:00
Santiago Pastorino
13e00ce606 fix stack trace lines on class_eval
Signed-off-by: José Valim <jose.valim@gmail.com>
2010-04-09 21:28:49 +02:00
Jeremy Kemper
4691c696b0 Expect an incompatible encoding exception when a template with a magic comment renders a partial without one and its source encoding doesn't match the default external encoding 2010-04-08 20:22:07 -07:00
Jeremy Kemper
bd2bf5390d Expect an incompatible encoding exception when a template doesn't have a magic comment and its source encoding doesn't match the default external encoding 2010-04-08 19:27:39 -07:00
Xavier Noria
fd7202a756 adds #favicon_link_tag back, rdoc explains why it is useful, and how to get a link for Mobile Safari with it 2010-04-08 18:13:23 -07:00
Carl Lerche
99d5459921 Fixed that default locale templates should be used if the current locale template is missing [DHH] 2010-04-08 18:11:26 -07:00
Michael Koziarski
82514c2897 Add accessors for request and response so tests don't have to mess with internal ivars 2010-04-09 11:30:39 +12:00
David Heinemeier Hansson
5f808b865c Consistently use lowercase instead of camelCase for all JS class names in Rails 2010-04-08 12:17:46 -07:00
David Heinemeier Hansson
00ee9b3369 Revert "adds #favicon_link_tag and #apple_touch_icon_link_tag" -- these tags are too specific.
This reverts commit 6891f46d10, ec8610cfdc, and  d18ff1b7ef.
2010-04-08 11:49:34 -07:00
Xavier Noria
ec8610cfdc adds a default source to #apple_touch_icon_link_tag 2010-04-07 13:20:52 -07:00
Xavier Noria
d18ff1b7ef new helpers #favicon_link_tag and #apple_touch_icon_link_tag 2010-04-07 13:04:52 -07:00
José Valim
eb063538bd Use config.filter_parameters on in-browser request dump. [#4335 state:resolved] 2010-04-07 01:42:51 +02:00
José Valim
46e2a44ee1 Rename search_field to test_search_field (ht: Piotr Usewicz) 2010-04-06 11:53:34 +02:00
David Heinemeier Hansson
f8730e5ce6 Added all the new HTML5 form types as individual form tag methods (search, url, number, etc) (Closes #3646) [Stephen Celis] 2010-04-05 16:07:44 -07:00
Joshua Peek
570c54c39a Fix cookie access in integration tests with other host names 2010-04-05 15:22:09 -07:00
Santiago Pastorino
d270da569e changed from :object_name to :as on form_for api 2010-04-05 18:55:37 -03:00
Santiago Pastorino
c6746ffaf4 deprecate form_for(symbol_or_string, ...) in favor of :object_name option 2010-04-05 17:47:02 -03:00
José Valim
6690d66292 Rename config.cookie_secret to config.secret_token and pass it as configuration in request.env. This is another step forward removing global configuration. 2010-04-05 12:00:24 +02:00
wycats
485512c50f Whitespace 2010-04-04 19:58:16 -07:00
wycats
209fb5190b render_to_string should have the identical signature as render 2010-04-04 19:58:15 -07:00
wycats
b546945b51 Reapply redirect {|params, request| } with passing tests this time 2010-04-04 13:17:14 -07:00
wycats
ab8bf9e152 * Change the object used in routing constraints to be an instance of
ActionDispatch::Request rather than Rack::Request.

* Changed ActionDispatch::Request#method to return a String, to be
  compatible with the Rack::Request superclass.

* Changed ActionDispatch::Request#method to return the original
  method in the case of methodoverride and #request_method not to,
  to be compatible with Rack::Request
2010-04-03 20:24:30 -07:00
wycats
3eb97531b8 Refactored url_for in AV to have its own instances of the helpers instead of proxying back to the controller. This potentially allows for more standalone usage of AV. It also kicked up a lot of dust in the tests, which were mocking out controllers to get this behavior. By moving it to the view, it made a lot of the tests more standalone (a win) 2010-04-03 02:44:02 -07:00
wycats
b29e893688 Fix memory leak in dev mode 2010-04-02 19:21:19 -07:00
José Valim
a0cdb0499e Maintain the usage of :as consistent in the router. Whenever it's supplied, it changes the NAMED ROUTE. If you want to change the PATH, use :path instead. Example: resources :projects, :path => 'projetos' 2010-04-02 19:13:47 +02:00
Bernardo de Pádua
81e6933246 Fix error in number_with_precision with :significant option and zero value [#4306 state:resolved]
Signed-off-by: José Valim <jose.valim@gmail.com>
2010-04-01 07:25:14 +02:00
Jeremy Kemper
3859828d89 HTML safety: give a deprecation warning if an array of option tags is passed to select tag. Be sure to join the tag yourself and mark them .html_safe 2010-03-31 19:51:54 -07:00
José Valim
62151dd272 Deprecate cookie_verifier_secret in favor of config.cookie_secret allowing signed cookies to work again. 2010-03-31 12:59:41 +02:00
José Valim
772a0226fd Add a test which ensures slugs in :id work. 2010-03-31 00:19:40 +02:00
Joshua Peek
cdf8c35ffd Consistent routing language 2010-03-30 14:05:42 -05:00
Joshua Peek
17f0c1e9e8 Fix stack overflow bug in integration test router helpers 2010-03-30 13:58:18 -05:00
wycats
201e8986b1 Updated asset_template_path to asset_path and have it also support a String [#4247 state:resolved] 2010-03-28 18:46:18 -07:00
Craig R Webster
49bc6a249e Allow customisation of asset path generation using a proc.
Set config.action_controller.asset_path_template to a proc that takes one
argument - the direct, unchanged asset path - and returns a path to that asset
using the scheme that your assets require.

This is useful if you have a setup which scales by introducing new application
servers where the mtime of the asset files may not be the same as those of the
asset files on your previous servers, but it does require your web servers to
have knowledge of the asset template paths that you rewrite to so it's not
suitable for out-of-the-box use. An example of configuring asset path
generation and rewriting these paths using Apache is included in
actionpack/lib/action_view/helpers/asset_tag_helper.rb.

Signed-off-by: wycats <wycats@gmail.com>
2010-03-28 18:35:05 -07:00
Rizwan Reza
cf6734fdf9 Add more tests and docs to uncountable routes. [#3930 state:resolved] 2010-03-28 18:34:48 -07:00
Jan De Poorter
72074aac33 Add _index to named collection routes for uncountable resources (e.g. Sheep)
Signed-off-by: Rizwan Reza <rizwanreza@gmail.com>
2010-03-28 18:34:48 -07:00
Paco Guzman
878a9e02f6 html_tag option to wrap error_message_on text [#4283 state:resolved]
Signed-off-by: wycats <wycats@gmail.com>
2010-03-28 17:27:10 -07:00
wycats
77a2a3d9b3 Request#content_type exists in Rack::Request, and other parts of Rack::Request expect
it to return a String. Split the Rails API so that Request#content_type returns
a String, and Request#content_mime_type returns a Mime::Type object.
2010-03-28 13:40:38 -07:00
Andrew White
e1a70faea6 Add constraints to resources in new routing DSL
Signed-off-by: Rizwan Reza <rizwanreza@gmail.com>
2010-03-28 23:31:13 +04:30
wycats
0a352056a4 Fixes a bug where error_messages_for was returning an empty div [#4048 state:resolved] (ht: Geoff Garside) 2010-03-27 03:10:05 -07:00
Daniel Rodríguez Troitiño
334983eca0 Recovers error_messages for ActiveRecordInstanceTag. [#4078 state:resolved]
Signed-off-by: wycats <wycats@gmail.com>
2010-03-27 01:56:20 -07:00
Andrew White
39c35ff04b Fix named routes for member actions of singleton resources [#4266 state:resolved]
Signed-off-by: wycats <wycats@gmail.com>
2010-03-27 00:49:47 -07:00
Rizwan Reza
167017f655 Tests method_missing to raise NameError. [#2522 state:resolved]
Signed-off-by: wycats <wycats@gmail.com>
2010-03-27 00:26:44 -07:00
Andrew White
3d746fcdb5 Add parameter defaults support to new routing DSL [#4265 state:resolved]
Signed-off-by: wycats <wycats@gmail.com>
2010-03-27 00:21:10 -07:00
José Valim
b2c2b0ce45 Rails router automatically calculated for you the controller and named routes in the following scenarios:
match "home/about"                 #=> maps to home#about with named route home_about_path
  match "about"                      #=> does not work because it cannot guess the controller
  match "about" => "home#about"      #=> maps to home#about with named route home_about_path
  match "home/about", :as => "about" #=> maps to home#about with named route about_path
2010-03-26 15:51:51 +01:00
wycats
15c31c7639 open_session can just return the a dup of the current context.
At this point, its entire purpose in the open_session {} case was to
delegate back to the IntegrationTest anyway.
2010-03-22 17:14:28 -07:00
José Valim
c53f77f3be Rename unsignificant to insignificant. 2010-03-23 00:26:12 +01:00