Mikel Lindsaar
e404490f9b
Merge branch 'master' of git://github.com/rails/rails
2010-06-08 00:10:11 -04:00
Mikel Lindsaar
21cc1ed437
Updating image_tag to support cid:content_id "URLs"
2010-06-07 21:53:31 -04:00
Diego Carrion
67a60ee314
Add shallow routes to the new router [ Closes #3765 ]
2010-06-07 18:09:20 -05:00
wycats
d6953cbfd3
regular expressions are usually ASCII-encoded, so force_encoding the content of a Node to the encoding of the regular expression is wrong.
2010-06-07 18:06:08 -04:00
José Valim
981f81275b
Fix case when rendering a partial inside RJS with inherited layout [ #4786 state:resolved]
2010-06-07 22:22:54 +02:00
Santiago Pastorino
ab764ecbfe
Makes text_helper methods sanitize the input if the input is not safe or :safe => true option is not provided
2010-06-07 15:31:21 -04:00
Santiago Pastorino
399b493cb4
content_tag_string shouldn't escape_html if escape param is false
2010-06-07 15:31:11 -04:00
wycats
eebac02606
Make named helpers unprotected without becoming actions [ #4696 state:resolved]
2010-06-07 15:29:55 -04:00
José Valim
1a8f784a23
member on resource should not expect an ID.
2010-06-07 11:20:54 +02:00
José Valim
5273bd97e6
Make AP test suite green once again and speed up performance in layouts lookup for some cases.
2010-06-07 10:13:41 +02:00
Rizwan Reza
ac9f8e1b7b
Router accepts member routes on resource. [ #4624 state:resolved]
2010-06-06 21:27:52 -04:00
Jeremy Kemper
83729e2fe3
Formats should always be an array.
2010-06-06 19:59:52 -04:00
Jeremy Kemper
9f93de9d3d
Reset request.parameters after assigning params for functional tests
2010-06-06 12:07:40 -07:00
Jeremy Kemper
509f3d7d2f
Simplify middleware stack lazy compares using named const references
2010-06-05 22:09:16 -07:00
Jeremy Kemper
7ace23abac
Restore flash sweep
2010-06-05 22:05:57 -07:00
wycats
a6b3942843
Optimize LookupContext
2010-06-04 20:11:06 -07:00
wycats
b8af484476
No need to unescape params twice if we came from Rack::Mount
2010-06-04 20:11:06 -07:00
wycats
ff4c218095
Memoizing methods on request means we need to clear them out on recycle!
2010-06-04 20:11:05 -07:00
wycats
cb1b2a719a
Stop the flash middleware from forcibly loading sessions even if the user doesn't use sessions at all
2010-06-04 20:11:05 -07:00
wycats
ab1407cc5b
Improve performance of commonly used request methods
2010-06-04 20:11:04 -07:00
Jeremy Kemper
bd9805871b
Include backtrace in failsafe log. Rescue possible exceptions in failsafe response.
2010-06-04 18:25:32 -07:00
David Heinemeier Hansson
3a066e81b3
Merge branch 'master' of github.com:rails/rails
2010-06-02 16:56:24 -05:00
David Heinemeier Hansson
4aac5fd711
Missed the extraction
2010-06-02 16:55:07 -05:00
José Valim
71375c8936
Add an asset_host accessor for consistency.
2010-06-02 14:53:56 -07:00
David Heinemeier Hansson
631dc61885
Extract assets paths and make them available to Action Mailer as well
2010-06-02 16:49:02 -05:00
wycats
ffe001f19d
Changes made while working on upgrading cells to Rails 3
2010-06-02 22:56:41 +02:00
Xavier Noria
315e8952df
revises the documentation of String#truncate and the truncate helper
2010-06-02 01:35:04 +02:00
David Heinemeier Hansson
d57397c4b6
Extracted String#truncate from TextHelper#truncate [DHH]
2010-06-01 16:38:42 -05:00
David Heinemeier Hansson
ea037ff557
Base options cant live in lazy loaded helpers as they then wont be available to set for config
2010-05-31 13:48:47 -05:00
José Valim
9a93844aba
Add :only and :except to controllers MiddlewareStack. This allows
...
you to do the following:
class PostsController < ApplicationController
use AutheMiddleware, :except => [:index, :show]
end
2010-05-30 15:53:14 +02:00
wycats
0078df6b54
Update template to allow handlers to more cleanly handle encodings (ht: nex3)
2010-05-30 11:37:35 +02:00
José Valim
19d8c8cbe4
Remove the laziness from the middleware stack.
2010-05-29 22:29:46 +02:00
wycats
45e60283e7
Removing Metal from Rails 3.
...
If you have existing Metals, you have a few options:
* if your metal behaves like a middleware, add it to the
middleware stack via config.middleware.use. You can use
methods on the middleware stack to control exactly where
it should go
* if it behaves like a Rack endpoint, you can link to it
in the router. This will result in more optimal routing
time, and allows you to remove code in your endpoint
that matches specific URLs in favor of the more powerful
handling in the router itself.
For the future, you can use ActionController::Metal to get
a very fast controller with the ability to opt-in to specific
controller features without paying the penalty of the full
controller stack.
Since Rails 3 is closer to Rack, the Metal abstraction is
no longer needed.
2010-05-29 20:08:00 +02:00
Michael Koziarski
668f7dd5d0
Merge commit 'mislav/auto_link'
2010-05-29 14:05:56 +12:00
Xavier Noria
ddec74fb3a
Merge remote branch 'rails/master'
2010-05-27 10:57:05 +02:00
David Chelimsky
e02db06ece
In AV::TC, move protect_against_forgery? from the test_case to the
...
_helper module included in the view.
- ensures that protect_against_forgery? is present when a helper
included in a partial that is rendered by the template under test
calls it (which happens in FormTagHelper#extra_tags_for_form, for
example).
[#4700 state:resolved]
Signed-off-by: José Valim <jose.valim@gmail.com >
2010-05-26 15:59:03 +02:00
David Chelimsky
163152bfd0
Support configuration of controller.controller_path on instances of
...
ActionView::TestCase::TestController without stubs. Just say:
@controller.controller_path = "path/i/need/for/this/test"
[#4697 state:resolved]
Signed-off-by: José Valim <jose.valim@gmail.com >
2010-05-26 08:49:57 +02:00
Jeremy Kemper
f53a6d8149
i18n: t() handles single keys returning an Array, also
2010-05-24 20:30:21 -07:00
Jeremy Kemper
d8d38bedfd
HTML safety: fix textarea with nil content
2010-05-24 20:18:25 -07:00
Santiago Pastorino
b5f9c8822d
translate method doesn't support arrays anymore and is optimized to be used with strings or symbols
...
Signed-off-by: José Valim <jose.valim@gmail.com >
2010-05-24 23:42:20 +02:00
Santiago Pastorino
2b8eb5404e
Revert "translation method for arrays on TranslationHelper module returns an array where values for keys of the form (.|_)html keys are html_safe"
...
This reverts commit 05c95b5c58 .
Signed-off-by: José Valim <jose.valim@gmail.com >
2010-05-24 23:41:55 +02:00
David Chelimsky
8e583b69e8
Move AV::TC to AV::TC::Behavior [ #4678 state:resolved]
...
- enables alternative testing frameworks to include AV::TC::Behavior
instead of subclassing AV::TC
- also added tests and code for:
- test view delegates :notice to request.flash
- useful since generators generate views that use notice
- test case doesn't try to include modules that are actually
classes
Signed-off-by: José Valim <jose.valim@gmail.com >
2010-05-24 22:58:46 +02:00
Santiago Pastorino
05c95b5c58
translation method for arrays on TranslationHelper module returns an array where values for keys of the form (.|_)html keys are html_safe
...
[#4675 ]
Signed-off-by: José Valim <jose.valim@gmail.com >
2010-05-24 20:12:43 +02:00
José Valim
59d1c418be
Fix a bug where responders were not working properly on method override.
2010-05-24 13:12:40 +02:00
Mislav Marohnić
8f0b2138ee
avoid auto_linking already linked emails; more robust detection of linked URLs
...
References #1523 [#1862 state:resolved] [#3591 state:resolved]
Add test that shows how link text can contain HTML if needed:
the trick is using block form in combination with `raw`.
Let link text be automatically HTML-escaped
[#2017 state:resolved]
2010-05-24 11:25:24 +02:00
Mislav Marohnić
133ada6ab0
auto_link: support arbitrary URI schemes like "ftp:" and "file:"
...
recognizes all URI scheme allowed characters, such as colon and period.
[#3494 state:resolved]
2010-05-24 11:25:24 +02:00
Santiago Pastorino
aacf2581cd
refactor evals and adds some __FILE__ and __LINE__
...
Signed-off-by: José Valim <jose.valim@gmail.com >
2010-05-20 15:18:57 +02:00
Rohit Arondekar
0244b43ecd
Minor typo fix in callbacks.rb of abstract_controller
2010-05-20 03:23:21 -07:00
Xavier Noria
7f07cc364a
Merge remote branch 'rails/master'
2010-05-19 23:29:39 +02:00
Santiago Pastorino
59c7b0c23a
Avoid instance variable @output_buffer not initialized
...
Signed-off-by: José Valim <jose.valim@gmail.com >
2010-05-19 12:59:29 +02:00