José Valim
80e1f730a2
Allow format to be skipped. This is used internally by mount.
2010-08-24 16:58:32 -03:00
José Valim
e197d6f34b
Finally fix the bug where symbols and strings were not having the same 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.
2010-08-24 16:58:25 -03:00
José Valim
4a90ecb3ad
Ensure shortcuts inside resources also generates helpers.
2010-08-24 16:58:12 -03:00
José Valim
2916521da8
Fix how routes inside namespaces are generated.
2010-08-24 13:05:29 -03:00
Santiago Pastorino
4df19b3f27
Allow actions which start with A-Za-z_ only
2010-08-24 12:43:43 -03:00
Andrew White
11f6179f55
Reset symbolized path parameters when a test request is recycled [ #5437 state:resolved]
...
Signed-off-by: José Valim <jose.valim@gmail.com >
2010-08-24 11:24:32 -03:00
José Valim
542878304d
Ensure prefix in routes are generated properly.
2010-08-24 11:24:31 -03:00
José Valim
b4f304b7b6
Fix a bug where symbols and strings were not behaving the same in the router. [ #5431 state:resolved]
2010-08-24 10:26:25 -03:00
Andrew White
2fb0cbec02
When custom resource actions are specified using strings add the default name and action if the string is a valid ruby method name.
...
[#5431 state:resolved]
Signed-off-by: José Valim <jose.valim@gmail.com >
2010-08-24 10:26:25 -03:00
David Heinemeier Hansson
21b1f29720
Master is now targeting 3.1.0.beta
2010-08-23 21:44:57 -05:00
Andrew White
ae2c60734a
Cache the symbolized path parameters using a instance variable in the 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 >
2010-08-22 16:17:26 -03:00
Nick Sieger
2277c51555
Fix hash modification during iteration in Mapper [ #5420 ]
...
Signed-off-by: Santiago Pastorino <santiago@wyeworks.com >
2010-08-20 18:27:02 -03:00
Andrew White
7c9bf45b0d
Support routing constraints in functional tests
...
Extend assert_recognizes and assert_generates to support passing
full urls as the path argument. This allows testing of routing
constraints such as subdomain and host within functional tests.
[#5005 state:resolved]
Signed-off-by: José Valim <jose.valim@gmail.com >
2010-08-20 14:51:25 -03:00
Andrew White
0d0fbf1e64
Don't add the standard https port when using redirect in routes.rb and ensure that request.scheme returns https when using a reverse proxy.
...
[#5408 state:resolved]
Signed-off-by: José Valim <jose.valim@gmail.com >
2010-08-20 10:40:34 -03:00
Andrew White
771d2f918f
Allow symbols for :path resource(s) option [ #5306 state:resolved]
...
Signed-off-by: José Valim <jose.valim@gmail.com >
2010-08-20 09:32:48 -03:00
José Valim
de0f47afb2
Use attribute readers as they are faster in general.
2010-08-19 15:16:11 -03:00
Andrew White
c019db8ca1
Move regexps in options hash to :constraints hash so that they are pushed into the scope [ #5208 state:resolved]
...
Signed-off-by: José Valim <jose.valim@gmail.com >
2010-08-19 15:05:57 -03:00
Andrew White
0cc483aa14
Move edit route before show route so that it will have precedence if the :id parameter allows slashes [ #5409 state:resolved]
...
Signed-off-by: José Valim <jose.valim@gmail.com >
2010-08-19 15:05:33 -03:00
wycats
483b60b9ff
Revert "It's snowing!"
...
This reverts commit e4283007d6 .
2010-08-18 16:49:06 -07:00
Javier Martín
3e871eee80
Don't pluralize resource methods [ #4704 state:resolved]
...
Signed-off-by: Santiago Pastorino <santiago@wyeworks.com >
2010-08-18 13:56:46 -03:00
Andre Arko
fca617af14
Allow member actions (get, etc) to accept strings, with test
2010-08-17 20:41:13 -03:00
José Valim
6e41cfb4e9
annoted_source_code may return nil if an error happens during template compiling.
2010-08-16 14:11:42 -03:00
Subba Rao Pasupuleti
54477c9848
select tags coerce the :selected option, options to strings before comparison [ #5056 state:resolved]
...
Signed-off-by: José Valim <jose.valim@gmail.com >
2010-08-15 16:46:32 -03:00
Bryce Thornton
fd78bb7270
Allow for any possible TLD when using the :all option with the cookie 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 >
2010-08-15 16:42:02 -03:00
Mikel Lindsaar
fd9f3ad36b
Making time_zone_options_for_select return a html_safe string
...
Signed-off-by: Santiago Pastorino <santiago@wyeworks.com >
2010-08-15 09:58:40 -03:00
Santiago Pastorino
b95d6e84b0
Deletes trailing whitespaces (over text files only find * -type f -exec sed 's/[ \t]*$//' -i {} \;)
2010-08-14 13:17:32 +02:00
Aaron Patterson
cfbfb86730
removing a lolinject
2010-08-14 13:17:31 +02:00
Santiago Pastorino
4c2bbe9a1a
Moves local_request? to require.local?
...
[#5361 state:committed]
2010-08-14 13:17:31 +02:00
Jeremy Kemper
17a6dfb745
It's snowing!
2010-08-14 13:17:30 +02:00
Mark Hayes
b680d153d2
in Rendering objects with RecordIdentifier example, locals should reference @account not @buyer
2010-08-12 12:52:17 -07:00
wycats
c6160898c8
Replace snowman with utf8=✓
2010-08-11 18:37:57 -07:00
Xavier Noria
1ee3593d65
no need to assign if we are gonna return
2010-08-12 00:17:10 +02:00
José Valim & Carlos Antonio da Silva
f08b58dd0c
layout_for works again with objects as specified in the documentation and Rails 2.3 [ #5357 state:resolved]
2010-08-11 10:23:07 -03:00
wycats
7171161124
rename _snowman to _e
2010-08-09 12:06:25 -07:00
wycats
6767946374
Improve best_standards_support to use only IE=Edge in development mode
2010-08-09 11:48:31 -07:00
Xavier Noria
4f7565c4de
adds missing requires for Object#try
2010-08-09 15:25:21 +02:00
Xavier Noria
4434e407e9
adds URL to the body generated by the redirect macro in the routes mapper as per the RFC, extracts common test pattern into a test macro, adds a test to cover the :status option
2010-08-09 13:31:42 +02:00
Piotr Sarnacki
84f0a0bc30
Reload action_methods in AbstractController after defining new method.
...
Signed-off-by: José Valim <jose.valim@gmail.com >
2010-08-04 14:44:34 -03:00
wycats
847c123ca5
Concernify SanitizeHelper and TextHelper so including TextHelper correctly include SanitizeHelper and extends its ClassMethods
2010-08-04 03:25:57 -07:00
Samuel Lebeau
f01184ad9e
Avoid potentially expensive inspect call in router. [ #4491 state:resolved]
...
Signed-off-by: José Valim <jose.valim@gmail.com >
2010-08-03 11:52:19 +02:00
Carlos Antonio da Silva
11614bddc0
Fix label form helper to use I18n and html options, without the need of 'nil' text param:
...
Before: f.label :title, nil, :class => 'title'
After : f.label :title, :class => 'title'
[#5267 state:committed]
Signed-off-by: Santiago Pastorino <santiago@wyeworks.com >
2010-08-01 21:51:54 -03:00
Santiago Pastorino
fb0bd8c109
Makes form_helper use overriden model accessors
...
[#3374 state:committed]
2010-08-01 19:32:22 -03:00
Rohit Arondekar
48d85a61bc
API Docs: Use 'HTTP_AUTHORIZATION' and not :authorize as key in integration tests.
2010-07-30 02:12:35 -07:00
Xavier Noria
755af49755
edit pass to apply API guideline wrt the use of "# =>" in example code
2010-07-30 02:30:04 +02:00
José Valim
0f0bdaea7b
Revert "Avoid uneeded queries in session stores if sid is not given."
...
First step to merge Rails and Rack session stores. Rack always expects to receive the SID since it may have different behavior if the SID is nil.
This reverts commit e210895ba9 .
2010-07-29 09:10:01 +02:00
wycats
aa24ea41d0
Forgot to check in this new file
2010-07-27 20:38:26 -07:00
wycats
123eb25fd1
Add a header that tells Internet Explorer (all versions) to use the best available standards support. This ensures that IE doesn't go into quirks mode because it has been blacklisted by too many users pressing the incompatible button. It also tells IE to use the ChromeFrame renderer, if the user has installed the plugin.
...
This guarantees that the best available standards support will be used on the client.
2010-07-27 19:25:07 -07:00
David Heinemeier Hansson
856fc4bbc3
Prep for RC
2010-07-26 12:53:25 -05:00
Wincent Colaiuta
c819c131f2
doc: cleanup respond_to documentation
...
Signed-off-by: Wincent Colaiuta <win@wincent.com >
2010-07-26 18:55:51 +02:00
Łukasz Strzałkowski
da845275dd
Removed deprecated APIs in text and number helpers [ #5156 state:resolved]
...
They're deprecated since 2008. It's time to get rid of them.
Signed-off-by: José Valim <jose.valim@gmail.com >
2010-07-26 17:26:59 +02:00