1550 Commits

Author SHA1 Message Date
Tom Stuart
2ecec6052f Make inheritance of map.resources :only/:except options behave more predictably
Signed-off-by: Michael Koziarski <michael@koziarski.com>
2008-11-14 12:26:43 +01:00
hiroshi
94d6716324 Make polymorphic_url compact given array [#1317 state:committed]
Signed-off-by: David Heinemeier Hansson <david@loudthinking.com>
2008-11-14 12:07:52 +01:00
Hongli Lai (Phusion)
4e9abdd7f1 Tag helper should output an attribute with the value 'false' instead of omitting the attribute, if the associated option is false but not nil. 2008-11-13 21:55:58 +01:00
Tom Stuart
4c09210244 Fix map.resources to always generate named routes if they're needed
Signed-off-by: Michael Koziarski <michael@koziarski.com>
2008-11-13 17:49:09 +01:00
Michael Koziarski
f1ad8b48aa Instead of overriding html_types, base the verification on browser_generated_types.
Also Deprecate the old unverifiable types.

[#1145 state:committed]
2008-11-13 11:23:34 +01:00
rick
00c46b5eeb fix two MimeType failing test cases
Signed-off-by: Michael Koziarski <michael@koziarski.com>
2008-11-13 11:23:34 +01:00
Jeff Cohen
fbbcd6f29a Changed request forgery protection to only worry about HTML-formatted content requests.
Signed-off-by: Michael Koziarski <michael@koziarski.com>
2008-11-13 11:23:21 +01:00
Tom Stuart
44a3009ff0 Add :only/:except options to map.resources
This allows people with huge numbers of resource routes to cut down on the memory consumption caused by the generated code.

Signed-off-by: Michael Koziarski <michael@koziarski.com>
[#1215 state:committed]
2008-11-12 12:57:58 +01:00
Pratik Naik
5cc27f2b03 Add some basic controller logging tests 2008-11-08 18:45:19 +05:30
Jeremy Kemper
0be5bc3f59 Work around ruby 1.9 segfault 2008-11-07 21:50:39 -05:00
Jeremy Kemper
425382d95f Don't worry about attribute ordering 2008-11-07 21:21:10 -05:00
Jeremy Kemper
aaa2abf73f Use delete if the rhs is nil 2008-11-07 21:19:02 -05:00
Rich Manalang
d3ec1d3c22 auto_link view helper was failing on URLs with colons after a query param
Signed-off-by: Michael Koziarski <michael@koziarski.com>
[#1341 state:committed]
2008-11-07 19:33:18 +00:00
David Heinemeier Hansson
a358d87e16 Fixed the sanitize helper to avoid double escaping already properly escaped entities [#683 state:committed] 2008-11-06 13:02:32 +01:00
Vladimir Dobriakov
5fad229e43 Fixed that FormTagHelper generates illegal html if name contains e.g. square brackets [#1238 state:committed]
Signed-off-by: David Heinemeier Hansson <david@loudthinking.com>
2008-11-04 18:24:52 +01:00
Bernardo de Pádua
b2cd318c2e Fix regression bug that made date_select and datetime_select raise a Null Pointer Exception when a nil date/datetime was passed and only month and year were displayed [#1289 state:committed]
Signed-off-by: David Heinemeier Hansson <david@loudthinking.com>
2008-11-04 18:15:54 +01:00
Tom Lea
5a02f0bccf Cleaned up route optimisation guard condition generation code as it was getting a little messy.
Add additional condition to handle the case where default_url_options is only defined in the controller, not the view.

Signed-off-by: Michael Koziarski <michael@koziarski.com>
2008-11-01 19:06:25 +01:00
David Heinemeier Hansson
cbeac93310 Added render :js for people who want to render inline JavaScript replies without using RJS [DHH] 2008-11-01 12:03:49 +01:00
Joshua Peek
2092687bcb Ensure content type gets reset after render_to_string [#1182 state:resolved] 2008-10-30 15:26:29 -05:00
David Heinemeier Hansson
7857e42103 Merge branch 'master' of git@github.com:rails/rails 2008-10-30 21:11:46 +01:00
Seth Fitzsimmons
47b4fa4a62 Fixed regex in redirect_to to fully support URI schemes [#1247 state:committed]
Signed-off-by: David Heinemeier Hansson <david@loudthinking.com>
2008-10-30 21:07:50 +01:00
Joshua Peek
ec38c84ce1 Dup local assigns for partial collections so nil values doesn't get overwritten [#1250 state:resolved] 2008-10-30 15:07:47 -05:00
David Heinemeier Hansson
4dbfe18b37 Proper API for reloading translations 2008-10-29 10:51:56 +01:00
Ryan Bates
4ad5aa9a39 Ensure @content_for_* is checked before yielding to block in render :layout [#8994 state:resolved]
Signed-off-by: Joshua Peek <josh@joshpeek.com>
2008-10-28 17:31:33 -05:00
Joshua Peek
ac50ee0edf Track rendered templates in stack so the current template can always be accessed. Added ActionView::Base#template to access the template object. 2008-10-28 11:06:08 -05:00
Erik Andrejko
ef9b6b5cba modified current_page? to ignore extra parameters unless specified in options
Signed-off-by: Michael Koziarski <michael@koziarski.com>
[#805 state:committed]
2008-10-26 19:14:45 +01:00
David Heinemeier Hansson
2c7abe1b56 Fixed bug with asset timestamping when using relative_url_root (Joe Goldwasser) [#1265 status:committed] 2008-10-26 16:50:18 +01:00
Jeffrey Hardy
3bcadc9290 Fix incorrect closing CDATA delimiter. Add tests for CDATA nodes.
Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net>
2008-10-23 19:16:26 -07:00
Jeffrey Hardy
1a18227261 Fix that HTML::Node.parse would blow up on unclosed CDATA sections.
If an unclosed CDATA section is encountered and parsing is strict, an
exception will be raised. Otherwise, we consider the remainder of the line to
be the section contents. This is consistent with HTML::Tokenizer#scan_tag.

Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net>
2008-10-23 19:16:12 -07:00
David Heinemeier Hansson
18542c9e00 Dont try to auto-set the etag based on the body if any freshness headers have already been set [DHH/José Valim] 2008-10-21 16:58:12 +02:00
David Heinemeier Hansson
448e7e7c04 Let fresh_when actually do the head(:not_modified). Cleaner and we get the filter halting for free then. 2008-10-21 02:54:55 +02:00
David Heinemeier Hansson
68d84e2593 Merge branch 'master' of git@github.com:rails/rails 2008-10-21 02:30:57 +02:00
David Heinemeier Hansson
9acb88e666 Added stale?/fresh? and fresh_when methods to provide a layer of abstraction above request.fresh? and friends [DHH] 2008-10-21 02:30:13 +02:00
Tim Harper
fcb45e5ec3 Ensure ActionView::Helpers::AssetTagHelper::AssetTag::Cache is cleared before loading so changes to asset files are picked up by the broswer [#1233 state:resolved]
Signed-off-by: Joshua Peek <josh@joshpeek.com>
2008-10-20 13:21:59 -05:00
David Heinemeier Hansson
1abdc8752d Added inline builder yield to atom_feed_helper tags where appropriate (Sam Ruby) [#8994 status:committed] 2008-10-13 19:52:37 +02:00
Matthew M. Boedicker
42cbd710bb Add support for xml processing instructions in atom_feed_helper [#926 state:resolved]
Signed-off-by: Pratik Naik <pratiknaik@gmail.com>
2008-10-13 18:46:32 +02:00
Eloy Duran
b47c76b1df Make sure named routes with parameters can be used in tests before a request has been done. [#1208 state:resolved]
Signed-off-by: Pratik Naik <pratiknaik@gmail.com>
2008-10-13 18:38:48 +02:00
Tom Stuart
e28ad77bba Allow use of :path_prefix and :name_prefix outside of namespaced routes. [#1188 state:resolved]
Signed-off-by: Pratik Naik <pratiknaik@gmail.com>
2008-10-08 14:56:52 +01:00
Michael Koziarski
aec391621b Make sure last_modified! works with <= rather than just equality. 2008-10-07 21:09:07 +02:00
Andrew Kaspick
dce6ade4cd Ensure select_tag#name attribute uses [] when :multiple is true. [#1146 state:resolved]
Signed-off-by: Pratik Naik <pratiknaik@gmail.com>
2008-10-07 15:17:22 +01:00
Tarmo Tänav
51b986619d Implement submit_to_remote as a wrapper around a more generic button_to_remote
Removed the "return false" from submit_to_remote onclick end as
button input elements have no default behavior to cancel.

Signed-off-by: Pratik Naik <pratiknaik@gmail.com>
2008-10-07 00:12:20 +01:00
madlep
8e50f0f96e Fix image_tag behavior on windows. [#1085 state:resolved]
Signed-off-by: Pratik Naik <pratiknaik@gmail.com>
2008-10-06 23:43:41 +01:00
Pratik Naik
5e3517ea7b Ensure rescue_from handlers are respected inside tests. [#835 state:resolved]
Note : If you're not using rescue_from, you should overrider rescue_action_without_handler() method
and not rescue_action(). Afterwards, you can set request.remote_addr to a non "0.0.0.0" value for testing the
overridden behavior.
2008-10-04 18:43:46 +01:00
madlep
2def5b6314 Fixed load path for actionmailer and activesupport tests to always load from local lib files.
[#983 state:committed]

Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net>
2008-10-04 07:57:18 -07:00
Michael Koziarski
0eefa7058a Fix etag! and last_modified! to work as advertised.
Add tests too.
2008-09-30 17:00:38 +02:00
Andrew Kaspick
8c105ee0c8 Add options to field_set_tag
Signed-off-by: Michael Koziarski <michael@koziarski.com>
[#1116 state:committed]
2008-09-29 17:47:29 +02:00
Martin Rehfeld
10380a22a6 Fixed AssetTag cache with with relative_url_root [#1022 state:resolved]
Signed-off-by: Joshua Peek <josh@joshpeek.com>
2008-09-22 13:23:23 -05:00
Joshua Peek
900fd6eca9 Refactor AssetTagHelper and fix remaining threadsafe issues. 2008-09-22 13:12:32 -05:00
Claudio Poli
5f83e1844c Fixed missing template paths on exception [#1082 state:resolved]
Signed-off-by: Joshua Peek <josh@joshpeek.com>
2008-09-20 22:57:45 -05:00
Michael Koziarski
2d27b82d4c Remove the country_select helper.
We're in no position to mediate disputes on this matter, and the previous change to use ISO 3166 has offended just as many people as the ad-hoc list did.

If you want the old list back you can install the plugin:

ruby script/plugin install git://github.com/rails/country_select.git
2008-09-18 21:30:52 +02:00