- 26 8月, 2015 7 次提交
-
-
由 Aaron Patterson 提交于
Controllers should always have a request and response when responding. Since we make this The Rule(tm), then controllers don't need to be somewhere in limbo between "asking a response object for a rack response" or "I, myself contain a rack response". This duality leads to conditionals spread through the codebase that we can delete: * https://github.com/rails/rails/blob/85a78d9358aa728298cd020cdc842b55c16f9549/actionpack/lib/action_controller/metal.rb#L221-L223
-
由 Aaron Patterson 提交于
-
由 Aaron Patterson 提交于
we don't need an instance to figure out what type of response to allocate. Later we'll pull this up the stack and pass the response object down
-
由 Aaron Patterson 提交于
This saves a lambda and request allocation on each request.
-
由 Aaron Patterson 提交于
controllers should always go through the `action` class method so that their middleware is respected.
-
由 Aaron Patterson 提交于
now the caller can just treat it like a regular controller even though it will return a 404
-
由 Marcin Olichwirowicz 提交于
They are already required in `actionpack/lib/action_dispatch.rb` (L25-L26)
-
- 25 8月, 2015 15 次提交
-
-
由 Marcin Olichwirowicz 提交于
This `protected` keyword looks like some leftover, since we are not using explicit receiver, this should go under `private`
-
由 NehaGautam 提交于
-
由 Anshul Sharma 提交于
-
由 amitkumarsuroliya 提交于
-
由 Aaron Patterson 提交于
-
由 Aaron Patterson 提交于
-
由 Aaron Patterson 提交于
-
由 Aaron Patterson 提交于
We don't want to directly access the env hash
-
由 Aaron Patterson 提交于
I want to implement this with something besides `@env` in the future, so lets stop directly referencing it.
-
由 Aaron Patterson 提交于
superclass already has this method, so remove this one
-
由 Aaron Patterson 提交于
the dispatcher class isn't configurable anymore, so pull up allocation to the method that needs it.
-
由 Aaron Patterson 提交于
Now that we don't have subclasses depending on this method (they augment the request class instead of the dispatch class) we can remove this method and directly ask the request object for the controller class
-
由 Aaron Patterson 提交于
-
由 Aaron Patterson 提交于
we don't need it anymore. We always use the same dispatcher in tests.
-
由 Aaron Patterson 提交于
controller class resolution has been moved to the request object, so we should override that method instead of relying on the RouteSet to generate the controller class.
-
- 24 8月, 2015 8 次提交
-
-
由 Aaron Patterson 提交于
-
由 Aaron Patterson 提交于
we already have a request, so we should use the methods on the request to access the path info information
-
由 Aaron Patterson 提交于
Creates fewer request objects and helps to abstract away from internals
-
由 Aaron Patterson 提交于
-
由 Aaron Patterson 提交于
-
由 Aaron Patterson 提交于
-
由 Aaron Patterson 提交于
-
由 Aaron Patterson 提交于
try to remove dependencies on `@env` so we can have more flexible internals
-
- 23 8月, 2015 10 次提交
-
-
由 deepj 提交于
-
由 Ronak Jangir 提交于
May be missed in 5fe14163 commit Also fixes the broken build
-
由 Aaron Patterson 提交于
This commit allows us to use one request object rather than allocating multiple request objects to deal with the session.
-
由 Aaron Patterson 提交于
We're going to implement storing env values differently in the future, so let's disconnect these methods from the instance variables
-
由 Aaron Patterson 提交于
-
由 Aaron Patterson 提交于
we're already doing this with a bunch of other header data.
-
由 Aaron Patterson 提交于
we have a method that knows how to get rack.input, so lets use that.
-
由 Aaron Patterson 提交于
We need to abstract the internals of the request object away from this instance variable so that the values for `@env` can be calculated in a different way.
-
由 Aaron Patterson 提交于
-
由 eileencodes 提交于
Since none of the action pack tests failed without this conditional it didn't seem necessary. This fixes the build because it correctly returns a 404 instead of a 500 for the asset routes test. Test that was failing was in the `assets_test.rb` file and was the test named `test_assets_routes_are_not_drawn_when_compilation_is_disabled`.
-