Commit Graph

8664 Commits

Author SHA1 Message Date
kennyj
db0499a6b6 Re-remove deprecated API. 2013-06-28 01:42:07 +09:00
Carlos Antonio da Silva
dd9d869746 Merge pull request #11000 from sbeckeriv/accept_header
Fix undefined method `ref' for nil:NilClass for bad accept headers
2013-06-25 19:34:20 -03:00
Andrew White
37b4276dbf Fix shorthand routes where controller and action are in the scope
Merge `:action` from routing scope and assign endpoint if both `:controller`
and `:action` are present. The endpoint assignment only occurs if there is
no `:to` present in the options hash so should only affect routes using the
shorthand syntax (i.e. endpoint is inferred from the the path).

Fixes #9856
2013-06-25 06:04:26 +01:00
Guillermo Iguaran
d6bc2fa5a9 Merge pull request #11069 from ykzts/actiondispatch-ssl-secure-flag-igonore-case
Flag cookies as secure with ignore case in ActionDispatch::SSL
2013-06-24 14:24:03 -07:00
Yamagishi Kazutoshi
891fd78cd7 Flag cookies as secure with ignore case in ActionDispatch::SSL 2013-06-24 18:01:30 +09:00
Geoff Buesing
d8bf1f22de ActionDispatch:SSL: don't include STS header in non-https responses 2013-06-23 20:01:20 -05:00
Piotr Sarnacki
50311f1391 Don't remove trailing slash from PATH_INFO for mounted apps
Previously when app was mounted as following:

    class Foo
      def call(env)
        [200, {}, [env['PATH_INFO']]]
      end
    end

    RackMountRailsBug::Application.routes.draw do
      mount RackTest.new => "/foo"
    end

trailing slash was removed from PATH_INFO. For example requesting

    GET /foo/bar/

on routes defined above would result in a response containing "/foo/bar"
instead of "/foo/bar/".

This commit fixes the issue.

(closes #3215)
2013-06-21 08:56:19 +02:00
Piotr Sarnacki
0d6e8edc2a Move actionpack/lib/action_view* into actionview/lib 2013-06-20 17:23:15 +02:00
Eric Hankins
71273430ce Fix name of nested attributes option include_id
The option to disable including a hidden ID field on a `fields_for` nested association was incorrectly documented as `hidden_field_id` instead of `include_id`
2013-06-19 13:41:41 -05:00
Stephen Becker IV
8ffd139edd Fix undefined method `ref' for nil:NilClass for bad accept headers 2013-06-19 06:29:52 -07:00
Uģis Ozols
33eec08dfd Remove duplicate letter 'a'. [ci skip] 2013-06-19 12:19:06 +03:00
Tute Costa
cdc4df79e1 Add respond_with location option to the docs 2013-06-18 10:26:38 +02:00
dtaniwaki
a84c40e19a Escape the string even when the condition of link_to_unless is not satisfied. 2013-06-16 22:28:40 -04:00
David Celis
8fc3427646 Use a case insensitive URI Regexp for #asset_path
Context: https://gist.github.com/radar/5793814

The `URI_REGEXP` that various AssetUrl helpers use is currently case
sensitive when checking for a URI scheme. This means if you try to pass
a URL like `HTTP://www.example.com/path/to/image.jpg`, you end up with
a bogus asset path: `/assets/HTTP://www.example.com/path/to/image.jpg`.

URLs are case insensitive, so this regexp should be as well.

Signed-off-by: David Celis <me@davidcel.is>
2013-06-16 16:57:49 -07:00
Vasiliy Ermolovich
782cee5377 collection tags accept html attributes as the last element of collection 2013-06-16 17:58:34 +03:00
Alex Peattie
a89bdc04ba Update the HTML boolean attributes per the HTML 5.1 spec
- Add attributes `allowfullscreen`, `default`, `inert`, `sortable`,
`truespeed`, `typemustmatch`.
- Fix attribute `seamless` (previously misspelled `seemless`).
- Use `assert_dom_equal` instead of `assert_equal` in test.
2013-06-14 23:47:21 +01:00
Guillermo Iguaran
934369f529 Don't set X-UA-Compatible header by default
We are setting this header to chrome=1 for Chrome Frame and this will be
retired soon. Check http://blog.chromium.org/2013/06/retiring-chrome-frame.html for
details
2013-06-13 14:56:02 -05:00
Paweł Gościcki
12bee89c31 Grammar nazi at work [ci skip] 2013-06-12 14:12:21 +02:00
diatmpravin
a3025975ec fixed typo in action_view template 2013-06-08 20:40:36 +05:30
David Heinemeier Hansson
95296f1a7a Merge pull request #10841 from latortuga/fix-underscore-dependency-tracking
Fix mismatching variable names when using an underscore
2013-06-04 12:45:15 -07:00
Drew Ulmer
2a576dd257 Fix mismatching variable names when using an underscore
The ERBTracker template digest helper class was using a regex to match
render calls and it was incorrectly not matching against variables with
underscores in the name. This caused it to use the wrong regex match data
to populate the template dependency. Because underscore is a valid
character for a variable, this fixes the ERBTracker to match it properly.
2013-06-04 14:39:50 -05:00
Rafael Mendonça França
bc8f802623 Merge pull request #10839 from gsamokovarov/clean-normalize_encoded_paths
Refactor ActionDispatch::Http::Parameters#normalize_encode_params
2013-06-04 12:23:07 -07:00
Rafael Mendonça França
733115dad2 Merge pull request #10838 from gsamokovarov/routing-autoload_under
DRY-up ActionDispatch::Routing autoloads
2013-06-04 12:21:16 -07:00
Genadi Samokovarov
998d03fddb Refactor ActionDispatch::Http::Parameters#normalize_encode_params 2013-06-04 13:42:40 +03:00
Genadi Samokovarov
e4fd22639f Dry-up ActionDispatch::Routing autoloads 2013-06-04 12:12:52 +03:00
kennyj
bc5314a102 Raise ArgumentError to fix Rails 4.1 deprecation warn message. 2013-06-02 00:39:11 +09:00
kennyj
74f2b41ce0 Remove Mime::Type#verify_request? and Mime::Type.browser_generated_types were deprecated. 2013-06-02 00:07:58 +09:00
kennyj
d3e8c149cb Remove ActionView::Template#mime_type was deprecated. 2013-06-01 23:22:12 +09:00
kennyj
d8c6f52d3b Remove ActionController::RecordIdentifier was deprecated. 2013-06-01 23:22:12 +09:00
kennyj
dabb9d1c83 Remove action_controller/vendor/html-scanner.rb was deprecated. 2013-06-01 23:22:12 +09:00
kennyj
cb8348b56f Remove :confirm and :disable_with options from ActionView::Helpers::FormTagHelper were deprecated. 2013-06-01 23:22:01 +09:00
kennyj
825f4df23c Remove link_to_function / button_to_function from ActionView::Helpers::JavascriptHelper were deprecated. 2013-06-01 23:17:27 +09:00
kennyj
8b80d72327 Remove :confirm and :disable_with options for ActionView::Helpers::UrlHelper#link_to and #button_to were deprecated. 2013-06-01 23:17:16 +09:00
Steve Klabnik
8603bc06ad Add propery docs to ActionDispatch::Response [ci skip]
After some discussion on Twitter with @skud, the documentation on ActionDispatch::Response is
a bit sparse. This class is useful when you're writing tests, as often you want to assert various
things about the response that's coming back. Better docs would make this easier for people new
to testing in Rails.

I only added some descriptions for various properties that were defined, and mostly just a sentence
or two. Most of these things are familliar if you're working with HTTP, but some words is better
than no words at all.

Hopefully further commits will fix up things that aren't just documentation.
2013-05-30 20:34:53 -07:00
Rafael Mendonça França
47f4d8d513 Merge pull request #10803 from gsamokovarov/extract-deep-munge
Extract ActionDispatch::Request#deep_munge
2013-05-30 12:21:17 -07:00
Genadi Samokovarov
5438f6866e Extract ActionDispatch::Request#deep_munge
ActionDispatch::Request#deep_munge was introduced as a private method,
but was turned into a public one for the use of
ActionDispatch::ParamsParser.

I have extracted it into ActionDispatch::Request::Utils, so it does not
get mixed up with the Request public methods.
2013-05-30 21:26:37 +03:00
Yves Senn
88e8e951a2 RoutesInspector deals with routes using regexp as :controller option 2013-05-30 08:39:57 +02:00
Rafael Mendonça França
73c6ca87a3 Require only minitest.
minitest/autorun required minitest/spec and we are avoiding to require
it.
2013-05-22 13:51:01 -03:00
Rafael Mendonça França
c86cdd1130 Merge pull request #10667 from rubys/minitest-autorun
Eliminate minitest warnings
2013-05-22 09:45:46 -07:00
José Valim
378ea96905 Add has_named_route? to the mapper API 2013-05-20 20:46:04 +02:00
Sam Ruby
e8dd88ac81 Eliminate minitest warnings
9a57c520ce (L15R8)
2013-05-17 13:02:29 -04:00
schneems
ba0695f48a Fix named routing regression from 3.2.13
When named route that is nested is used in 3.2.13

Example `routes.rb`:

```
resources :nested do
  resources :builder, :controller => 'nested/builder'
end
```

In 3.2.12 and 3.2.12 this named route would work:

```
nested_builder_path(:last_step, :nested_id => "foo")
```

Generating a url that looks like `/nested/foo/builder/last_step`. This PR fixes the regression when building urls via the optimized helper. Any explicit keys set in the options are removed from the list of implicitly mapped keys.

Not sure if this is exactly how the original version worked, but this fixes this use case regression.
2013-05-16 18:42:15 -03:00
Aaron Patterson
9fef7c8dc9 Merge pull request #10527 from zenspider/squishy_minitest5
Squishy minitest5
2013-05-16 13:41:54 -07:00
Rafael Mendonça França
c9d75e0814 Revert "Integration tests support the OPTIONS http method"
This reverts commit ad46884af567d6f8d6d8d777f372c39e81a560ba.

Conflicts:
	actionpack/CHANGELOG.md
	actionpack/lib/action_dispatch/testing/integration.rb
	actionpack/test/controller/integration_test.rb

Reason: It will conflict with a lot of test cases. Better to call
`process` directly since this is a very uncommon HTTP method.

Fixes #10638.
2013-05-16 14:41:36 -03:00
Rafael Mendonça França
4eb16e7a06 Merge pull request #10636 from seanwalbran/fix-asset-host-proc-returning-nil
fix rails4 regression with asset_host Proc returning nil
2013-05-16 09:42:41 -07:00
Rafael Mendonça França
6a4ff5cc09 Revert "Add the options method to action_controller testcase."
This reverts commit 0303c2325fab253adf5e4a0b738cb469c048f008.

Conflicts:
	actionpack/lib/action_controller/test_case.rb

REASON: It will conflict with a lot of test cases. Better to call
`process` directly since this is a very uncommon HTTP method.

Fixes #10638.
2013-05-16 11:10:59 -03:00
Sean Walbran
122ac9fd46 restore ability to return nil from asset_host proc, add test 2013-05-15 09:07:46 -05:00
Aaron Patterson
ba55276434 deprecating string based terminators 2013-05-14 16:03:09 -07:00
Aaron Patterson
4c628e48a5 inspect the filter when displaying error messages 2013-05-14 14:13:32 -07:00
Arun Agrawal
d63e44c461 Fixing build broken by this change
c43ca06ca091fc09e2c86bb051ac92b648f12b64
2013-05-13 12:19:25 +02:00