Commit Graph

1029 Commits

Author SHA1 Message Date
José Valim
96aa3bd0ea Clean up subdomain code a bit. 2011-10-04 11:31:47 +02:00
Kamil Sobieraj
de942e5534 :subdomain can now be specified with a value of false in url_for, allowing for subdomain(s) removal from the host during link generation. Closes #2025 2011-10-04 09:16:34 +01:00
José Valim
6e8fe1bf02 TestCase should respect the view_assigns API instead of pulling variables on its own. 2011-10-02 11:29:13 +02:00
Evgeniy Dolzhenko
86cf3fb5fa Implement Mime::Type#respond_to? (consistently with #method_missing) 2011-09-25 13:03:01 +01:00
Santiago Pastorino
3de95fd930 Revert "Make process reuse the env var passed as argument"
This reverts commit 0e4748cd41.
2011-09-24 17:19:42 -03:00
José Valim
43d27e9105 Deprecate passing the template handler in the template name.
For example, calling hello.erb is now deprecated. Since Rails 3.0
passing the handler had no effect whatsover. This commit simply
deprecates such cases so we can clean up the code in later releases.
2011-09-22 15:37:38 +02:00
Pawel Pierzchala
019eea4a38 Fix named routes modifying arguments 2011-09-22 09:57:00 +02:00
Aaron Patterson
f65b2215cd removing backwards compatibility module 2011-09-12 16:50:49 -07:00
Aaron Patterson
ea7ef9597e partially expand the parameters to match 2011-09-12 16:50:49 -07:00
Aaron Patterson
ad1a891649 unfactor the Route class to private factory methods 2011-09-12 16:50:49 -07:00
Aaron Patterson
943aa826a4 reduce dependencies of external objects in the Route class 2011-09-12 16:50:49 -07:00
Aaron Patterson
f5ab6805ed delete unused code, pass path explicitly to journey 2011-09-12 16:50:49 -07:00
Aaron Patterson
a08bee7841 all routes can be stored in the Journey Routes object 2011-09-12 16:50:48 -07:00
Aaron Patterson
b7ccfa96d2 clear! does not need to be called from initialize 2011-09-12 16:50:48 -07:00
Aaron Patterson
59b9fe961d reuse the route collection and formatter by clearing them 2011-09-12 16:50:48 -07:00
Aaron Patterson
4ffe667ab7 Instantiate each part of our routing system:
* A collection of Routes
  * The Router, which consults the collection of routes
  * A formatter that consults the collection of routes
2011-09-12 16:50:48 -07:00
Aaron Patterson
537ed6eb2f stop freezing the routes 2011-09-12 16:50:47 -07:00
Aaron Patterson
a05a9ff1ca stop using a hash for parameterizing 2011-09-12 16:50:47 -07:00
Aaron Patterson
5f0b37c486 Switching rack-mount to journey. 2011-09-12 16:50:47 -07:00
Jon Leighton
16f1ce41d5 Merge pull request #2499 from akaspick/assert_select_email_fix
Fix assert_select_email to work on non-multipart emails as well as converting the Mail::Body to a string to prevent errors.
2011-09-07 05:51:31 -07:00
Santiago Pastorino
ef14a0ec86 Merge pull request #2577 from rails-noob/master
Fix double slash at start of paths when mounting an engine at the root.
2011-09-06 09:10:39 -07:00
rails-noob
43fbb1e6b8 Fix bug #2579.
Avoids double slash at start of paths when mounting an engine at the root.
2011-09-06 15:26:19 +00:00
Milan Dobrota
9b08afd2f4 if ... nil? is more expensive than unless 2011-09-04 10:44:08 -05:00
Vijay Dev
eeda8403fd Merge branch 'master' of github.com:lifo/docrails 2011-09-02 23:00:59 +05:30
Aaron Patterson
fdd619e9a7 CookieJar is enumerable. fixes #2795 2011-09-01 13:37:14 -07:00
Carlos Paramio
3f64fa9289 Fix name of parent resource params when declaring nested resources at routes 2011-09-01 20:34:15 +02:00
Vijay Dev
7a7a3bcf02 Merge pull request #2718 from dasch/patch-5
Split long string into multiple shorter ones
2011-09-01 10:45:34 -07:00
Daniel Schierbeck
a720243961 Split long string into multiple shorter ones
This makes the code more readable.
2011-08-29 04:15:15 +03:00
Daniel Schierbeck
62a61add7e Refactor ActionDispatch::Http::UploadedFile 2011-08-28 16:16:22 +02:00
Vijay Dev
8526f727cf doc fixes 2011-08-28 02:27:39 +05:30
Aaron Patterson
b907271b4b stop circular require warnings 2011-08-24 16:47:01 -07:00
Arun Agrawal
8196c842b6 We actually don't need a reverse_merge! here. dup removed was giving error with nil class. 2011-08-12 16:56:29 +05:30
Andrew Kaspick
60d358b233 fix assert_select_email to work on non-multipart emails as well as converting the Mail::Body to a string to prevent errors. 2011-08-11 17:49:31 -05:00
Andrew Kaspick
61579b7661 when calling url_for with a hash, additional (likely unwanted) values (such as :host) would be returned in the hash... calling #dup on the hash prevents this 2011-08-11 13:28:31 -05:00
Santiago Pastorino
8845ae683e x_sendfile_header now defaults to nil and production.rb env file doesn't
set a particular value for it. This allows servers to set it through
X-Sendfile-Type, read
https://github.com/rack/rack/blob/master/lib/rack/sendfile.rb for more
info. Anyways you can force this value in your production.rb
2011-08-07 13:11:50 -03:00
Vijay Dev
d8c77fa16c document meta method 2011-08-04 16:40:25 -07:00
José Valim
caacf85673 Merge pull request #2327 from cesario/patch-1
We don't need to require erb here.
2011-07-28 11:24:08 -07:00
José Valim
b295ea1362 Merge pull request #2330 from thedarkone/resources-router-fix
Inline resources router fix
2011-07-28 11:10:23 -07:00
thedarkone
a5f57a7ef2 Make use of the inherited initializer. 2011-07-28 20:02:21 +02:00
thedarkone
4d4d2179f6 There is no need to be destructive with the passed-in options.
This fixes a bug that is caused by Resource/SingletonResource mangling resource options when using inline "multi"-resource declarations.
2011-07-28 20:00:48 +02:00
Franck Verrot
ad0772f268 We don't need to require erb here. 2011-07-28 18:45:43 +03:00
Aaron Patterson
0b987042bf simplify conditionals by assuming hash values will never be false 2011-07-26 17:49:47 -07:00
Aaron Patterson
7868cf8a65 use regular ruby rather than clever ruby 2011-07-26 17:45:34 -07:00
Aaron Patterson
ba43b9bf5f fixing wildcard path matching when wildcard is inside parenthesis 2011-07-26 17:33:22 -07:00
Santiago Pastorino
b4efff4bac Remove blank line 2011-07-26 19:20:45 -03:00
thoefer
3bfcf5ffc8 refactored 'assert_redirected_to': local call to validate_request! will be called in assert_response already. changed names of local variables in order to recognize the semantics a bit easier. 2011-07-26 11:42:53 +02:00
Erik Michaels-Ober
b9c9142603 Allow a route to have :format => true
When format is true, it is mandatory (as opposed to :format => false).
This is currently not possible with resource routes, which automatically
make format optional by default.
2011-07-25 11:37:25 -07:00
Santiago Pastorino
8e0061128e Merge pull request #2245 from davidtrogers/constraints_block_passed_to_following_routes_in_same_scope
Memoizing @blocks & disposing of constraints options properly
2011-07-25 10:32:31 -07:00
Dave Rogers
4dc42f5353 Ensure the constraints block is only applied to the correct route
addresses issue #1907 - any routes that follow a route with a constraints
  block are inheriting the previous route's constraints.
2011-07-25 09:59:53 -07:00
thedarkone
036f77574d Make polymorphic_url calls go through application helpers again.
This brings back the ability to overwrite/extend url generating methods in application heleprs.
2011-07-25 13:43:02 +02:00