Commit Graph

3992 Commits

Author SHA1 Message Date
Thiago Pradi
c6e6598d96 Removing old Controller test 2012-02-12 21:05:30 -02:00
Thiago Pradi
c0a1a86693 Cleaning Route generation tests 2012-02-12 03:09:03 -02:00
Xavier Noria
69147ee072 say goodbye to #with_test_routes 🪓 2012-02-10 22:56:26 -08:00
Xavier Noria
fd5d9b366c fixes a regression introduced by 532cd4, and a bogus test in AP the regression uncovered 2012-02-10 22:17:30 -08:00
kennyj
203b88f998 Fix GH #4720. Routing problem with nested namespace and already camelized controller option. 2012-02-10 21:20:55 +09:00
Xavier Noria
a8e9f2910f Merge pull request #4957 from ganeshkumar/order_hash_change
replacing the orderhash with hash for ruby-1.9
2012-02-09 02:47:19 -08:00
ganesh
970f54adb6 removed unnecessary code 2012-02-09 16:06:51 +05:30
ganesh
b314524128 replacing the orderhash with hash for ruby-1.9 2012-02-09 15:53:06 +05:30
Carlos Antonio da Silva
4e7d94ea2c Fix failing request test
Latest changes in remote ip handling conflicted with each other in
tests. Related:

dd09811fa6214a130fdc2de1d4c00b4337cb15f9
6a720226aad2adffcbd2422d40db772719579e2f
2012-02-07 20:46:00 -02:00
Ryan McGeary
30e5503d00 Added unit test to cover changes to RouteSet.url_for
ActionDispatch::Routing::RouteSet.url_for now handles passing params through to
ActionDispatch::Http::Url.url_for

Conflicts:

	actionpack/test/controller/base_test.rb
2012-02-07 13:28:30 -05:00
Ryan McGeary
6efb849b32 Fixed force_ssl redirects to include original query params
`ActionController.force_ssl` redirects http URLs to their https equivalent;
however, when a URL contains a query string, the resulting redirect lacked the
original query string.

Conflicts:

	actionpack/lib/action_controller/metal/force_ssl.rb
2012-02-07 13:28:29 -05:00
José Valim
275c3a1cb3 Merge pull request #2490 from gsterndale/x_forwarded_for_order
The first IP address in the X-Forwarded-For header is the originating IP
2012-02-07 09:54:51 -08:00
Greg Sterndale
6a720226aa The first IP address in the X-Forwarded-For header is the originating IP 2012-02-07 12:39:41 -05:00
José Valim
641359e54a Merge pull request #2632 from gsterndale/replace_trusted_proxies
Trusted proxies are configurable
2012-02-07 08:45:29 -08:00
José Valim
dd9b428cbc Merge pull request #4918 from scottwb/fix-single-accept-with-q
Fix MIME::Type.parse handling of single media with a q value
2012-02-07 08:28:06 -08:00
Greg Sterndale
dd09811fa6 Trusted proxies is replaced with a Regexp or appended to with a String 2012-02-07 11:21:32 -05:00
Rafael Mendonça França
e41425a8ea Always use content_tag for audio/video tag
Closes #4919
2012-02-07 10:50:23 -02:00
Scott W. Bradley
339c99b62c Failing test case that shows issue #736 should still be open. 2012-02-06 18:12:43 -08:00
kennyj
837231a829 Fix url_for method's behavior when it is called with :controller option which starts with "/" from multiple nested controller.
Closes #3864
2012-02-07 00:45:01 +09:00
Jeremy Kemper
b8f2a43ce2 Revert "Deprecated multi args to http route methods"
Too painful to lose the compact shorthand form!

This reverts commit e848c52535fa0f9488cdbdb3f1cedc7c7c02d643.

Conflicts:

	actionpack/lib/action_dispatch/routing/mapper.rb
2012-02-05 23:22:49 -07:00
Brian Cardarella
e4915e1796 Highlight defaults to HTML5 mark element 2012-02-05 12:08:21 -05:00
kennyj
1ec5c2674f Add testcase for non english filename. Related to #2982. 2012-02-05 22:34:29 +09:00
Prem Sichanugrist
bcd3b870ce Add *_url helpers to get the full assets URL
Adds `image_url`, `javascript_url`, `stylesheet_url`, `audio_url`,
`video_url`, and `font_url` to assets tag helper. These URL helpers will
return the full path to your assets. This is useful when you are going
to reference this asset from external host.
2012-02-04 17:57:05 -05:00
José Valim
776a3736e4 Merge pull request #4869 from sikachu/master-responder-fix
Fix override API response bug in respond_with
2012-02-04 06:49:26 -08:00
kennyj
e7ec969895 Fix GH #4873. Allow swapping middleware of same class 2012-02-04 22:59:13 +09:00
Prem Sichanugrist
3def1c8edb Fix override API response bug in respond_with
Default responder was only using the given respond block when user
requested for HTML format, or JSON/XML format with valid resource. This
fix the responder so that it will use the given block regardless of the
validity of the resource. Note that in this case you'll have to check
for object's validity by yourself in the controller.

Fixes #4796
2012-02-03 14:15:51 -05:00
Rafael Mendonça França
5d8191a263 Remove default class to collection_check_boxes and
collection_radio_buttons

[Carlos Antonio da Silva + Rafael Mendonça França]
2012-02-02 14:52:59 -02:00
Carlos Antonio da Silva
0f23426155 Allow collection radio_buttons/check_boxes to access current text/value
[Carlos Antonio da Silva + Rafael Mendonça França]
2012-02-02 14:52:33 -02:00
Carlos Antonio da Silva
f506c8063b Add changelog, docs and guides entries
[Carlos Antonio da Silva + Rafael Mendonça França]
2012-02-02 14:52:15 -02:00
Carlos Antonio da Silva
9035324367 Allow proc for value/text method in collection_select
And options_from_collection_for_select as well.

[Carlos Antonio da Silva + Rafael Mendonça França]
2012-02-02 14:31:53 -02:00
Carlos Antonio da Silva
17d214a1d4 Create a Builder factory class to use with collection helpers + block
This will make it easy for the user to handle how check box/radio and
labels should be generated, abstracting any text/value/default html
options required to make it work.

[Carlos Antonio da Silva + Rafael Mendonça França]
2012-02-02 09:40:24 -02:00
Carlos Antonio da Silva
b17be2938c Remove collection_wrapper* and item_wrapper* options
[Carlos Antonio da Silva + Rafael Mendonça França]
2012-02-02 09:40:24 -02:00
Carlos Antonio da Silva
e39f8a2ccc Use @output_buffer variable instead of concat in tests
[Carlos Antonio da Silva + Rafael Mendonça França]
2012-02-02 09:40:23 -02:00
Rafael Mendonça França
6028c1549f Implement skipped test
[Carlos Antonio da Silva + Rafael Mendonça França]
2012-02-02 09:40:23 -02:00
Rafael Mendonça França
21eba34718 Add collection_radio_buttons and collection_check_boxes to FormBuilder
[Carlos Antonio da Silva + Rafael Mendonça França]
2012-02-02 09:40:23 -02:00
Rafael Mendonça França
3312cdb0bb Change Tag class to Category since there is another Tag class
[Carlos Antonio da Silva + Rafael Mendonça França]
2012-02-02 09:40:22 -02:00
Carlos Antonio da Silva
7af0ec75d0 Add collection_check_boxes helper
[Carlos Antonio da Silva + Rafael Mendonça França]
2012-02-02 09:40:22 -02:00
Carlos Antonio da Silva
9323fb6057 Create collection_radio_buttons helper
[Carlos Antonio da Silva + Rafael Mendonça França]
2012-02-02 09:40:22 -02:00
Carlos Antonio da Silva
3d1095563c Replicate :form html5 attribute to hidden field for check_box
When the new html5 attribute :form is given to the check_box helper, it
should be replicated to the hidden field as well. Closes #4848
2012-02-02 09:27:25 -02:00
José Valim
049dc500b6 Merge pull request #4804 from rafaelfranca/check_box-fix
check_box with nil as unchecked value should be HTML safe
2012-02-01 10:10:53 -08:00
Carlos Antonio da Silva
608eddc6f5 Move escape_once logic to ERB::Util, where it belongs to
All the logic is based on the HTML_ESCAPE constant available in
ERB::Util, so it seems more logic to have the entire method there and
just delegate the helper to use it.
2012-02-01 08:55:18 -02:00
José Valim
0eb4673697 Merge pull request #4672 from carlosantoniodasilva/av-url-helper
Improvements on some url helper methods and tests
2012-02-01 02:50:33 -08:00
Rafael Mendonça França
ceb1ea632e check_box with nil as unchecked value should be HTML safe
[Carlos Antonio da Silva + Rafael Mendonça França]
2012-01-31 16:29:11 -02:00
Lucas Caton
a5976ccc37 Remove slash from favicon_link_tag method attribute 2012-01-31 15:46:02 -02:00
Nathan Broadbent
b31eac5609 Replaced all 'for' loops with Enumerable#each 2012-01-30 03:15:49 +08:00
Vasiliy Ermolovich
735c56d0cd tiny refactoring
use :default option with translate method instead of condition
simplify separator method
2012-01-29 18:26:38 +03:00
Carlos Antonio da Silva
b09aca6e3d Remove not used env[] call in routing_test.
The commit 4c321c6d42b6e35f9ead12eb1dccdead03c5abf4 removes the path_params variable assignment, actually the entire line is not used at all.
2012-01-27 19:48:53 -02:00
kennyj
4c321c6d42 Fix warning. assigned but unused variable - path_params 2012-01-28 01:16:32 +09:00
Carlos Antonio da Silva
b03e55d177 Do not generate label for attribute when giving nil 2012-01-26 21:23:33 -02:00
Sergey Nartimov
858f4646fe reuse common video/audio tags code and do not modify options 2012-01-26 01:13:20 +03:00