Commit Graph

11870 Commits

Author SHA1 Message Date
Santiago Pastorino
da175a2b46 Relax Rack dependency
Rack is very carefully released, we should be able to upgrade minor
versions without much effort. We are a bunch of Rails core who are also
Rack core members so there won't be any issue with that. And in case
there's something wrong, we should fix on both sides.
Even though, doesn't seem like we will have a 1.7 version, this will be
useful as an example for when we go with Rack 2.0. We should ~> 2.0.
2015-01-12 15:32:33 -02:00
claudiob
7d493a6020 Remove unused AV fixtures from AP tests
When `render` was moved from ActionPack to ActionView in acc8e259,
some fixtures required by the tests were duplicated, but they are
actually only required by ActionView tests.

To give one example, `double_render` is already defined [in the AV tests](72139d8d31/actionview/test/actionpack/controller/render_test.rb (L407))
and is never used in the ActionPack tests.
2015-01-11 13:01:13 -08:00
Rafael Mendonça França
7b47f422cf Merge pull request #18435 from kuldeepaggarwal/f-remove-unnecessary-require
No need of requiring `rbconfig`, it is by-default loaded
2015-01-11 16:13:22 -02:00
yuuji.yaginuma
e3be421cc1 remove autoload HideActions, no longer exist 2015-01-11 21:13:59 +09:00
Kuldeep Aggarwal
90aef23e38 No need of requiring rbconfig, it is by-default loaded 2015-01-10 20:27:18 +05:30
Yves Senn
a7621d7d53 formatting pass over CHANGELOGs. [ci skip] 2015-01-10 12:17:57 +01:00
Yves Senn
a94f8e71d2 Merge pull request #18423 from jone/remove-default-header
Default headers, removed in controller actions, will not be reapplied to the test response
2015-01-09 17:01:31 +01:00
Jonas Baumann
0739480f45 Default headers, removed in controller actions, will not be reapplied to the test response. 2015-01-09 16:55:02 +01:00
Abdelkader Boudih
7644a99d90 Deprecate all *_filter callbacks in favor of *_action callbacks 2015-01-08 20:52:36 +00:00
Rafael Mendonça França
b8e83ce1c5 Merge pull request #18404 from claudiob/rebase-14549
Add test case and documentation for skip_before_filter.
2015-01-08 18:08:02 -02:00
David Heinemeier Hansson
9af5f33a16 Fix the example (for realz) 2015-01-08 11:18:06 -08:00
David Heinemeier Hansson
6b9a973154 Fix the example 2015-01-08 11:17:03 -08:00
Josef Šimánek
0074bbb07b Add prepend option to protect_from_forgery. 2015-01-08 19:47:19 +01:00
claudiob
9a25603d0a Add test/doc for :if/:except in skip_before_action
The new test/docs further explain the conflicts that can happen when
mixing `:if`/`:unless` options with `:only`/`:except` options in
`skip_before_action`.

The gist is that "positive" filters always have priority over negative
ones.

The previous commit already showed that `:only` has priority over `:if`.

This commit shows that `:if` has priority over `:except`.

For instance, the following snippets are equivalent:

```ruby
skip_before_action :some_callback, if: -> { condition }, except: action
```

```ruby
skip_before_action :some_callback, if: -> { condition }
```
2015-01-08 09:30:31 -08:00
Lauro Caetano
ae9f803c5d Add test case and documentation for skip_before_filter.
Test case for using skip_before_filter with the options :only and :if
both present. In this case, the :if option will be ignored and :only
will be executed.

Closes #14549 (the commit was cherry-picked from there).
2015-01-08 09:13:45 -08:00
brainopia
08d3f0e3b3 Remove ActionController::HideActions (closes #18336) 2015-01-06 23:40:45 +03:00
Lindsey Bieda
c6117b6be1 Changing sets -> set
Updating some minor grammar issue.
2015-01-06 13:08:34 -05:00
Josef Šimánek
734306612e Improve protect_from_forgery documentation. [ci skip]. 2015-01-06 00:37:37 +01:00
Rafael Mendonça França
f8e36d49f4 Merge pull request #18341 from aditya-kapoor/remove-unneeded-checks
remove unneeded check since /_one_time_conditions/ is not present anymore.
2015-01-05 09:47:30 -03:00
brainopia
e275479ce5 Reset template assertions without warnings 2015-01-05 15:06:42 +03:00
Aditya Kapoor
21dfe89ac7 remove unneeded check since /_one_time_conditions/ is removed 2015-01-05 16:52:19 +05:30
Josef Šimánek
24d48dfc1a Document all options for protect_from_forgery.
[ci skip]
2015-01-04 23:59:11 +01:00
Carlos Antonio da Silva
cf6b13b2be Remove unused require
This was used by the respond_to/respond_with implementation on this
file, which is now extracted to the responders gem.
2015-01-04 18:26:36 -02:00
Carlos Antonio da Silva
afd5e9a7ff Remove respond_to/respond_with placeholder methods
This functionality has been extracted to the responders gem.
2015-01-04 18:22:09 -02:00
Rafael Mendonça França
758e223c45 Remove Struct#to_h backport 2015-01-04 16:20:18 -03:00
Rafael Mendonça França
21f02f3485 Remove some comments about Ruby 1.9 behaviors 2015-01-04 15:55:28 -03:00
Rafael Mendonça França
bf7b8c193f Remove unneeded requires
These requires were added only to change deprecation message
2015-01-04 12:11:03 -03:00
Rafael Mendonça França
92e27d30d8 Remove deprecated assertion files 2015-01-04 11:58:42 -03:00
Rafael Mendonça França
34e380764e Remove deprecated usage of string keys in URL helpers 2015-01-04 11:58:42 -03:00
Rafael Mendonça França
e4e1fd7ade Remove deprecated only_path option on *_path helpers 2015-01-04 11:58:42 -03:00
Rafael Mendonça França
d282125a18 Remove deprecate *_path helpers in email views 2015-01-04 11:58:42 -03:00
Rafael Mendonça França
2cc91c37bc Remove deprecated NamedRouteCollection#helpers 2015-01-04 11:58:42 -03:00
Rafael Mendonça França
1f3b0a8609 Remove deprecated support to define routes with :to option that
doesn't contain `#`
2015-01-04 11:58:41 -03:00
Rafael Mendonça França
4b19d5b7bc Remove deprecated ActionDispatch::Response#to_ary 2015-01-04 11:58:41 -03:00
Rafael Mendonça França
7676659633 Remove deprecated ActionDispatch::Request#deep_munge 2015-01-04 11:58:41 -03:00
Rafael Mendonça França
7fe7973cd8 Remove deprecated ActionDispatch::Http::Parameters#symbolized_path_parameters 2015-01-04 11:58:41 -03:00
Rafael Mendonça França
e4cfd353a4 Remove deprecated option use_route in controller tests 2015-01-04 11:58:41 -03:00
Rafael Mendonça França
4591b0fc04 Merge pull request #17227 from claudiob/explicitly-abort-callbacks
Introduce explicit way of halting callback chains by throwing :abort. Deprecate current implicit behavior of halting callback chains by returning `false` in apps ported to Rails 5.0. Completely remove that behavior in brand new Rails 5.0 apps.

Conflicts:
	railties/CHANGELOG.md
2015-01-03 17:22:20 -03:00
Robin Dupret
9b9ec0ded4 Fix a few typos [ci skip] 2015-01-03 16:36:33 +01:00
Vijay Dev
4b9dba99d6 Merge branch 'master' of github.com:rails/docrails 2015-01-03 14:58:17 +00:00
Rafael Mendonça França
3456d543eb Merge pull request #10380 from JonRowe/test_all_domain_2_letter_tld
Assert that 2 letter tlds with 3 letter domain names work when option specified.
2015-01-02 21:27:38 -03:00
claudiob
2386daabe7 Throw :abort halts default CallbackChains
This commit changes arguments and default value of CallbackChain's :terminator
option.

After this commit, Chains of callbacks defined **without** an explicit
`:terminator` option will be halted as soon as a `before_` callback throws
`:abort`.

Chains of callbacks defined **with** a `:terminator` option will maintain their
existing behavior of halting as soon as a `before_` callback matches the
terminator's expectation. For instance, ActiveModel's callbacks will still
halt the chain when a `before_` callback returns `false`.
2015-01-02 15:31:55 -08:00
Rafael Mendonça França
48deeab90a Merge pull request #8740 from amatsuda/missing_source_file
replace use of MissingSourceFile with LoadError

Conflicts:
	activesupport/test/core_ext/load_error_test.rb
2015-01-02 19:19:59 -03:00
Rafael Mendonça França
2d743b528c Merge pull request #17978 from kommen/fixed-pr-14903
Ensure append_info_to_payload is called even if an exception is raised.

Conflicts:
	actionpack/CHANGELOG.md
2015-01-02 14:16:15 -03:00
brainopia
95333e1317 Integration requests should work in contexts without setup and teardown 2015-01-02 16:52:32 +03:00
Robin Dupret
24637e577c Merge pull request #18271 from arunagw/change-copyright-year
Update copyright notices to 2015 [ci skip]
2015-01-01 00:08:17 +01:00
Robin Dupret
7ef7f1cc15 Correctly use the response's status code calling head
Commit 20fece1 introduced the `_status_code` method to fix calls to
`head :ok`. This method has been added on both ActionController::Metal
and ActionDispatch::Response.

As for the latter, this method is just equivalent to the `response_code`
one so commit aefec3c removed it from the `Reponse` object so call to
the `_status_code` method on an ActionController::Base instance would be
handled by the `Metal` class (which `Base` inherits from) but the status
code is not updated according to the response at this level.

The fix is to actually rely on `response_code` for ActionController::Base
instances but this method doesn't exist for bare Metal controllers so we
need to define it.
2014-12-31 16:37:35 +01:00
Arun Agrawal
4de18d0ead Update copyright notices to 2015 [ci skip] 2014-12-31 08:34:14 +01:00
Aaron Patterson
4080dd2f24 stop referencing env in url_for
encapsulate env in the request so that we can eventually move away from
the env hash
2014-12-30 15:18:20 -08:00
Aaron Patterson
87a7591064 use methods on the request rather than direct hash access
this will help decouple us from using the rack env hash
2014-12-30 14:48:10 -08:00