aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/test/dispatch
Commit message (Collapse)AuthorAgeFilesLines
...
* Setup explicit requires for files with exceptions. Removed them from ↵Łukasz Strzałkowski2010-09-023-0/+3
| | | | | | autoloading. Signed-off-by: José Valim <jose.valim@gmail.com>
* Move implicit nested call before options handling so that nested constraints ↵Andrew White2010-09-011-0/+18
| | | | | | work [#5513 state:resolved] Signed-off-by: José Valim <jose.valim@gmail.com>
* Bump rack-mount to 0.6.13 and add test case for named character classes ↵Andrew White2010-08-311-0/+12
| | | | | | [#5509 state:resolved] Signed-off-by: Santiago Pastorino <santiago@wyeworks.com>
* Use nested scope for routes defined at the :resources scope level (as in ↵Andrew White2010-08-241-0/+7
| | | | | | Rails 2.3) Signed-off-by: José Valim <jose.valim@gmail.com>
* Allow format to be skipped. This is used internally by mount.José Valim2010-08-241-1/+1
|
* Finally fix the bug where symbols and strings were not having the same ↵José Valim2010-08-241-6/+38
| | | | | | | behavior in the router. If you were using symbols before for methods like match/get/post/put/delete, it is likely that this commit will break your routes. Everything should behave the same if you are using strings, if not, please open up a ticket.
* Ensure shortcuts inside resources also generates helpers.José Valim2010-08-241-4/+4
|
* Fix how routes inside namespaces are generated.José Valim2010-08-241-3/+3
|
* Allow actions which start with A-Za-z_ onlySantiago Pastorino2010-08-241-1/+4
|
* Fix a bug where symbols and strings were not behaving the same in the ↵José Valim2010-08-241-3/+3
| | | | router. [#5431 state:resolved]
* When custom resource actions are specified using strings add the default ↵Andrew White2010-08-241-0/+22
| | | | | | | | name and action if the string is a valid ruby method name. [#5431 state:resolved] Signed-off-by: José Valim <jose.valim@gmail.com>
* Cache the symbolized path parameters using a instance variable in the ↵Andrew White2010-08-221-0/+21
| | | | | | | | | | | request object rather than the environment hash. This it to prevent stale parameters in later routing constraints/redirects as only the normal path parameters are set by Rack::Mount. Also if a constraint proc arity is more than one, pass the symbolized path parameters as the first argument to match redirect proc args and provide easier access. [#5157 state:resolved] Signed-off-by: José Valim <jose.valim@gmail.com>
* Don't add the standard https port when using redirect in routes.rb and ↵Andrew White2010-08-202-0/+54
| | | | | | | | ensure that request.scheme returns https when using a reverse proxy. [#5408 state:resolved] Signed-off-by: José Valim <jose.valim@gmail.com>
* Allow symbols for :path resource(s) option [#5306 state:resolved]Andrew White2010-08-201-0/+19
| | | | Signed-off-by: José Valim <jose.valim@gmail.com>
* Move regexps in options hash to :constraints hash so that they are pushed ↵Andrew White2010-08-191-0/+22
| | | | | | into the scope [#5208 state:resolved] Signed-off-by: José Valim <jose.valim@gmail.com>
* Move edit route before show route so that it will have precedence if the :id ↵Andrew White2010-08-191-0/+16
| | | | | | parameter allows slashes [#5409 state:resolved] Signed-off-by: José Valim <jose.valim@gmail.com>
* Don't pluralize resource methods [#4704 state:resolved]Javier Martín2010-08-181-0/+62
| | | | Signed-off-by: Santiago Pastorino <santiago@wyeworks.com>
* Allow member actions (get, etc) to accept strings, with testAndre Arko2010-08-171-1/+1
|
* Allow for any possible TLD when using the :all option with the cookie ↵Bryce Thornton2010-08-151-1/+29
| | | | | | session store. This works for subdomain.mysite.local, google.co.uk, google.com.au, etc. [#5147 state:resolved] Signed-off-by: José Valim <jose.valim@gmail.com>
* Deletes trailing whitespaces (over text files only find * -type f -exec sed ↵Santiago Pastorino2010-08-145-8/+8
| | | | 's/[ \t]*$//' -i {} \;)
* adds URL to the body generated by the redirect macro in the routes mapper as ↵Xavier Noria2010-08-091-30/+25
| | | | per the RFC, extracts common test pattern into a test macro, adds a test to cover the :status option
* Ensure insert_before in middleware stack raises a meaningful error message ↵José Valim2010-07-211-0/+10
| | | | [#3679 state:resolved]
* Extract ParameterFilter class from FilterParameters mixinBryan Helmkamp2010-07-191-4/+4
| | | | Signed-off-by: wycats <wycats@gmail.com>
* Set session options id to nil is respected and cancels lazy loading.José Valim2010-07-181-1/+19
|
* Routes should respect namespace even if action is a regexp and just ↵José Valim2010-07-121-3/+15
| | | | controller is given to to.
* When a dynamic :controller segment is present in the path add a Regexp ↵Andrew White2010-07-071-11/+25
| | | | | | | | | | | constraint that allow matching on multiple path segments. Using a namespace block isn't compatible with dynamic routes so we raise an ArgumentError if we detect a :module present in the scope. [#5052 state:resolved] Signed-off-by: José Valim <jose.valim@gmail.com>
* Refactor handling of :only and :except options. The rules are:Andrew White2010-07-061-47/+190
| | | | | | | | | | | 1. Don't inherit when specified as an option on a resource 2. Don't push into scope when specified as an option on a resource 2. Resources pull in :only or :except options from scope 3. Either :only or :except in nested scope overwrites parent scope [#5048 state:resolved] Signed-off-by: José Valim <jose.valim@gmail.com>
* Recognize should also work with route is wrapped in a constraint.José Valim2010-07-061-1/+4
|
* Fix syntax of routing tests so they actually runAndrew White2010-07-041-12/+18
| | | | Signed-off-by: José Valim <jose.valim@gmail.com>
* Refactor resource options and scoping. Resource classes are now only ↵Andrew White2010-07-041-2/+81
| | | | | | 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>
* Fix routes with :controller segment when namespaced [#5034 state:resolved]José Valim2010-07-021-5/+19
|
* Unify routes naming by renaming router to routesPiotr Sarnacki2010-07-021-8/+8
| | | | Signed-off-by: José Valim <jose.valim@gmail.com>
* porting session.clear fix to master branch. [#5030 state:resolved]Aaron Patterson2010-07-011-0/+22
| | | | Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net>
* A couple enhancements to the router:José Valim2010-06-301-0/+27
| | | | | | | | * 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;
* Merge :constraints from scope into resource options [#2694 state:resolved]Andrew White2010-06-281-0/+43
| | | | Signed-off-by: José Valim <jose.valim@gmail.com>
* Remove invalid conditions from route [#4989 state:resolved]Andrew White2010-06-281-0/+12
| | | | Signed-off-by: José Valim <jose.valim@gmail.com>
* Fix several known web encoding issues:wycats2010-06-271-0/+23
| | | | | | | | | | | | | | | | | | | | | | | * 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
* Upgrade to Rack 1.2.1Jeremy Kemper2010-06-271-8/+14
|
* Fixed that an ArgumentError is thrown when request.session_options[:id] is ↵Michael Lovitt2010-06-272-0/+50
| | | | | | | | 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>
* Support optional static segements as well [#4832 state:resolved]Andrew White2010-06-261-0/+34
| | | | Signed-off-by: José Valim <jose.valim@gmail.com>
* Fixed normalize_path in Routing::Mapper to handle optional prefix segments ↵Paul Barry2010-06-261-0/+46
| | | | | | 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-0/+9
| | | | | | state:resolved] Signed-off-by: José Valim <jose.valim@gmail.com>
* Failing test for whether glob parameters accept regexpsAndrew White2010-06-251-0/+9
| | | | | | [#4970 state:committed] Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net>
* Add failing test case for parameters with periodsAndrew White2010-06-251-0/+27
| | | | | | [#2536 state:resolved] Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net>
* Make sure that Rails doesn't resent session_id cookie over and over again if ↵Prem Sichanugrist2010-06-251-0/+12
| | | | | | | | 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>
* Avoid deserializing cookies too early, which causes session objects to not ↵José Valim2010-06-241-3/+3
| | | | be available yet. Unfortunately, could not reproduce this in a test case.
* Fix namespaced redirects [#4389 state:resolved]Andrew White2010-06-241-0/+14
| | | | 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-232-3/+39
| | | | | | | | 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-1/+20
| | | | | | | | | | 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/+11
|