aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/lib/action_dispatch
Commit message (Collapse)AuthorAgeFilesLines
* Refactor resource options and scoping. Resource classes are now only ↵Andrew White2010-07-041-99/+64
| | | | | | responsible for controlling how they are named. All other options passed to resources are pushed out to the scope. Signed-off-by: José Valim <jose.valim@gmail.com>
* Fixes for "router" and "routes" terminologyWincent Colaiuta2010-07-033-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | Commit f7ba614c2db improved the internal consistency of the different means of accessing routes, but it introduced some problems at the level of code comments and user-visible strings. This commit applies fixes on three levels: Firstly, we remove or replace grammatically invalid constructs such as "a routes" or "a particular routes". Secondly, we make sure that we always use "the router DSL" or "the router syntax", because this has always been the official terminology. Finally, we make sure that we only use "routes" when referring to the application-specific set of routes that are defined in the "config/routes.rb" file, we use "router" when referring on a more abstract level to "the code in Rails used to handle routing", and we use "routing" when we need an adjective to apply to nouns such as "url_helpers. Again this is consistent with historical practice and other places in the documentation. Note that this is not a sweep over the entire codebase to ensure consistent usage of language; it is just a revision of the changes introduced in commit f7ba614c2db. Signed-off-by: Wincent Colaiuta <win@wincent.com> Signed-off-by: José Valim <jose.valim@gmail.com>
* Refactor recall parameter normalization [#5021 state:resolved]Andrew White2010-07-031-16/+6
| | | | Signed-off-by: José Valim <jose.valim@gmail.com>
* Fix routes with :controller segment when namespaced [#5034 state:resolved]José Valim2010-07-022-18/+34
|
* Unify routes naming by renaming router to routesPiotr Sarnacki2010-07-024-7/+7
| | | | Signed-off-by: José Valim <jose.valim@gmail.com>
* porting session.clear fix to master branch. [#5030 state:resolved]Aaron Patterson2010-07-011-0/+5
| | | | Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net>
* Avoid calls to Rails::Application since this is not the official API.José Valim2010-07-011-1/+1
| | | | Your application should *always* reference your application const (as Blog::Application) and Rails.application should be used just internally.
* A couple enhancements to the router:José Valim2010-06-301-27/+48
| | | | | | | | * Allow to use the get :symbol shortcut outside resources scopes as well; * Fix a bug where :action was not being picked from given options; * Giving :as option inside a resource now changes just the relative name instead of the full name;
* Clean up the logic to specify the name and path for action a bit.José Valim2010-06-301-87/+51
|
* ETag: use body instead of @body since the method will always return a stringJeremy Kemper2010-06-281-2/+2
|
* Tidy up valid conditions in router a bit.José Valim2010-06-281-2/+4
|
* Add :controller and :action to the list of valid conditionsAndrew White2010-06-281-0/+1
| | | | Signed-off-by: José Valim <jose.valim@gmail.com>
* Merge :constraints from scope into resource options [#2694 state:resolved]Andrew White2010-06-281-4/+6
| | | | Signed-off-by: José Valim <jose.valim@gmail.com>
* Remove invalid conditions from route [#4989 state:resolved]Andrew White2010-06-282-4/+14
| | | | Signed-off-by: José Valim <jose.valim@gmail.com>
* Deprecate the old router DSL. Since it is still used intensively across ↵José Valim2010-06-281-0/+2
| | | | ActionPack test suite, patches that translates Rails internal tests to the new router DSL are welcome (note though that a few tests shouldn't be translated since they are testing exactly the old mapper API, like the ones in actionpack/test/controller/resource_test.rb and actionpack/test/controller/routing_test.rb)
* Fix several known web encoding issues:wycats2010-06-271-1/+30
| | | | | | | | | | | | | | | | | | | | | | | * Specify accept-charset on all forms. All recent browsers, as well as IE5+, will use the encoding specified for form parameters * Unfortunately, IE5+ will not look at accept-charset unless at least one character in the form's values is not in the page's charset. Since the user can override the default charset (which Rails sets to UTF-8), we provide a hidden input containing a unicode character, forcing IE to look at the accept-charset. * Now that the vast majority of web input is UTF-8, we set the inbound parameters to UTF-8. This will eliminate many cases of incompatible encodings between ASCII-8BIT and UTF-8. * You can safely ignore params[:_snowman_] TODO: * Validate inbound text to confirm it is UTF-8 * Combine the whole_form implementations in form_helper_test and form_tag_helper_test
* Vendor unreleased rack-mount 0.6.6.pre dependencyJeremy Kemper2010-06-2735-1/+4014
|
* Fixed that an ArgumentError is thrown when request.session_options[:id] is ↵Michael Lovitt2010-06-272-36/+38
| | | | | | | | read in the following scenario: when the cookie store is used, and the session contains a serialized object of an unloaded class, and no session data accesses have occurred yet. Pushed the stale_session_check responsibility out of the SessionHash and down into the session store, closer to where the deserialization actually occurs. Added some test coverage for this case and others related to deserialization of unloaded types. [#4938] Signed-off-by: José Valim <jose.valim@gmail.com>
* Normalize recall params when the route is not a standard route otherwise ↵Andrew White2010-06-271-3/+26
| | | | | | :controller and :action may appear in the generated url [#4326 state:resolved] Signed-off-by: José Valim <jose.valim@gmail.com>
* Support optional static segements as well [#4832 state:resolved]Andrew White2010-06-261-1/+1
| | | | Signed-off-by: José Valim <jose.valim@gmail.com>
* Fixed normalize_path in Routing::Mapper to handle optional prefix segments ↵Paul Barry2010-06-261-1/+1
| | | | | | with static and dynamic parts Signed-off-by: José Valim <jose.valim@gmail.com>
* Don't force pluralization of controller name when defining a resource [#4980 ↵Andrew White2010-06-261-1/+9
| | | | | | state:resolved] Signed-off-by: José Valim <jose.valim@gmail.com>
* URL fragments should not have safe characters escaped. Ref: Appendix A, ↵Andrew White2010-06-251-1/+1
| | | | | | | | http://tools.ietf.org/rfc/rfc3986.txt [#4762 state:resolved] Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net>
* Do not mark the session as loaded if an error happened while doing it.José Valim2010-06-251-2/+1
|
* Calling exists? in the session store, without checking for stale sessions, ↵José Valim2010-06-252-10/+10
| | | | was causing the cookie store to panic because we need to unpack the whole session to get its key. This commit fixes this issue and also caches exists calls for performance improvements.
* Make sure that Rails doesn't resent session_id cookie over and over again if ↵Prem Sichanugrist2010-06-251-1/+3
| | | | | | | | it's already there [#2485 state:resolved] This apply to only Active Record store and Memcached store, as they both store only the session_id, which will be unchanged, in the cookie. Signed-off-by: José Valim <jose.valim@gmail.com>
* Just reading flash messages should not create a session if one does not ↵José Valim2010-06-252-2/+12
| | | | exist yet.
* Avoid deserializing cookies too early, which causes session objects to not ↵José Valim2010-06-242-18/+22
| | | | be available yet. Unfortunately, could not reproduce this in a test case.
* Fix namespaced redirects [#4389 state:resolved]Andrew White2010-06-241-1/+1
| | | | Signed-off-by: José Valim <jose.valim@gmail.com>
* Sessions should not be created until written to and session data should be ↵Michael Lovitt2010-06-234-30/+116
| | | | | | | | destroyed on reset. [#4938] Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net>
* Add the :path option to match routes when given as symbols. This is ↵Carlos Antonio da Silva2010-06-231-9/+8
| | | | | | | | | | specially useful in http helpers for generating routes in scenarios like: resources :users, :path => 'usuarios' do get :search, :on => :collection, :path => 'pesquisar' end Signed-off-by: José Valim <jose.valim@gmail.com>
* Provive resources_path_names helpers in the router.José Valim2010-06-231-0/+4
|
* Stop filling the blocks scope array with nil.José Valim2010-06-221-1/+3
|
* Allow namespace accept options in routes [#4936 state:resolved]Carlos Antonio da Silva2010-06-221-3/+5
| | | | Signed-off-by: José Valim <jose.valim@gmail.com>
* Deprecate :name_prefix in the new router DSL.José Valim2010-06-221-20/+22
|
* Remove unused variable on assert_recognizes [#4912 state:resolved]Paco Guzman2010-06-221-1/+0
| | | | Signed-off-by: José Valim <jose.valim@gmail.com>
* removed 'unless const_defined?' code smellJosh Kalderimis2010-06-211-23/+19
| | | | Signed-off-by: José Valim <jose.valim@gmail.com>
* Merge remote branch 'rails/master'Xavier Noria2010-06-205-165/+293
|\ | | | | | | | | Conflicts: actionpack/lib/abstract_controller/base.rb
| * Use the new ActiveSupport::FileUpdateChecker instead of RoutesReloader.José Valim2010-06-201-1/+1
| |
| * Use Rack::Utils.bytesize when calculating content-length of exception pages. ↵Tarsoly András2010-06-201-1/+1
| | | | | | | | | | | | [#4727 state:resolved] Signed-off-by: José Valim <jose.valim@gmail.com>
| * remove executable permission from files that don't need it. [#4802 ↵rohit2010-06-201-0/+0
| | | | | | | | | | | | state:resolved] Signed-off-by: José Valim <jose.valim@gmail.com>
| * Don't use module to work out shallow name prefix and path as it may not ↵Andrew White2010-06-201-9/+17
| | | | | | | | | | | | accurately reflect the actual namespace [#4899 state:resolved] Signed-off-by: José Valim <jose.valim@gmail.com>
| * Accept an object for :constraints option [#4904 state:resolved]Andrew White2010-06-201-1/+1
| | | | | | | | Signed-off-by: José Valim <jose.valim@gmail.com>
| * Merge branch 'master' of github.com:rails/railsJosé Valim2010-06-201-7/+36
| |\
| | * Custom resource routes should be scopedAndrew White2010-06-191-7/+36
| | | | | | | | | | | | | | | | | | [#3765] Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net>
| * | Clear DescendantsTracker on each request.José Valim2010-06-191-4/+4
| |/
| * fix for :shallow in router not generating helpers for create, update, and ↵Josh Kalderimis2010-06-181-4/+3
| | | | | | | | | | | | | | | | destroy actions when :only or :except are used [#4900 state:committed] Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net>
| * Add shallow routing option to new router [#3765 status:committed]Andrew White2010-06-171-156/+248
| | | | | | | | Signed-off-by: David Heinemeier Hansson <david@loudthinking.com>
* | Take out documentation from DeprecatedMapper to discourage its usage.Rizwan Reza2010-06-211-384/+0
| |
* | Use h1 for titles.Rizwan Reza2010-06-211-1/+1
| |