aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/lib/action_controller/metal.rb
Commit message (Collapse)AuthorAgeFilesLines
* Correctly use the response's status code calling headRobin Dupret2014-12-311-4/+1
| | | | | | | | | | | | | | | | 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.
* Make _status_code methods nodocPrathamesh Sonpatki2014-10-191-3/+3
| | | | | - Also one minor change for documenting url_for method in ActionController::Metal. [ci skip]
* copy edits[ci skip]Vijay Dev2014-08-021-3/+1
|
* Performed Returns true if redirect/render has happenedGaurish Sharma2014-07-191-1/+4
|
* Merge branch 'constraints'Aaron Patterson2014-05-271-3/+8
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * constraints: rm reset_parameters because we automatically do it from 9ca4839a move path_parameter encoding check to the request object dispatcher doesn't need `call` anymore call `serve` with the request on dispatchers constraints class does not need the request class anymore give all endpoints a superclass skip the build business if the stack is empty stop hardcoding path_parameters and get it from the request we do not need to cache rack_app a redirect is not a dispatcher by definition, so eliminate test push is_a check up to where the Constraints object is allocated pass the request object to the application pass a request to `matches?` so we can avoid creating excess requests nothing is passed to `rack_app` anymore, so rm the params one fewer is_a check Constraints#app should never return another Constraints object, so switch to if statement eliminate dispatcher is_a checks push is_a?(Dispatcher) check in to one place Always construct route objects with Constraint objects Conflicts: actionpack/lib/action_controller/metal.rb
| * skip the build business if the stack is emptyAaron Patterson2014-05-261-2/+6
| |
| * stop hardcoding path_parameters and get it from the requestAaron Patterson2014-05-261-1/+2
| |
* | Remove duplicated to_s method call.Guo Xiang Tan2014-05-251-1/+1
|/
* use Proc.new to automatically do parameter checking for usAaron Patterson2014-05-231-3/+1
|
* fixes stack level too deep exception on action named 'status' returning ↵Christiaan Van den Poel2014-05-151-0/+4
| | | | 'head :ok'
* Update AC::Metal documentation example [ci skip]Yury Velikanau2014-04-151-1/+2
| | | | Include proper module since AV was extracted form AP as mentioned in #14659.
* Increase readability of ternary statement in build methodbuddhamagnet2013-04-201-2/+1
|
* replace match with get verb in ActionController::MetalGaurish Sharma2013-04-161-1/+1
|
* Missing or unneeded require extract_optionsAkira Matsuda2013-02-011-0/+1
|
* Multiple changes to 1,9 hash syntaxAvnerCohen2012-10-271-2/+2
|
* removes unnecessary selfXavier Noria2012-09-171-1/+1
|
* revises RDoc in AC::Metal [ci skip]Xavier Noria2012-09-171-14/+7
|
* removes unnecessary selfXavier Noria2012-09-171-1/+1
|
* load active_support/core_ext/class/attribute in active_support/railsXavier Noria2012-08-021-1/+0
|
* load active_support/core_ext/object/blank in active_support/railsXavier Noria2012-08-021-1/+0
|
* adding a buffered stream to the response objectAaron Patterson2012-07-291-1/+1
|
* Use performed? instead of checking for response_bodyCarlos Antonio da Silva2012-01-191-4/+4
| | | | | | * Check for performed? instead of response_body * Change performed? to return a boolean * Refactor AC::Metal#response_body= to reuse variable
* Do not deprecate performed.José Valim2012-01-191-0/+4
|
* refactor response_body= methodVasiliy Ermolovich2012-01-141-7/+1
| | | | response_to?(:each) returns false for strings in ruby 1.9, so there is no need for these checks
* Fix AC::Metal#response_body= to store same value on Ruby 1.8 and 1.9Akira Matsuda2011-11-071-1/+7
| | | | This was because String#respond_to?(:each) differs in 1.8 and 1.9
* make our constructor signature match the superclassAaron Patterson2011-04-171-1/+1
|
* Add docs for ActionController::Metal class methodsGabriel Horner2011-03-281-1/+5
|
* Merge branch 'master' into nested_has_many_throughJon Leighton2011-03-041-7/+56
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: activerecord/CHANGELOG activerecord/lib/active_record/association_preload.rb activerecord/lib/active_record/associations.rb activerecord/lib/active_record/associations/class_methods/join_dependency.rb activerecord/lib/active_record/associations/class_methods/join_dependency/join_association.rb activerecord/lib/active_record/associations/has_many_association.rb activerecord/lib/active_record/associations/has_many_through_association.rb activerecord/lib/active_record/associations/has_one_association.rb activerecord/lib/active_record/associations/has_one_through_association.rb activerecord/lib/active_record/associations/through_association_scope.rb activerecord/lib/active_record/reflection.rb activerecord/test/cases/associations/has_many_through_associations_test.rb activerecord/test/cases/associations/has_one_through_associations_test.rb activerecord/test/cases/reflection_test.rb activerecord/test/cases/relations_test.rb activerecord/test/fixtures/memberships.yml activerecord/test/models/categorization.rb activerecord/test/models/category.rb activerecord/test/models/member.rb activerecord/test/models/reference.rb activerecord/test/models/tagging.rb
| * revises a metal exampleXavier Noria2011-02-021-4/+4
| |
| * copy-edits 2446b13Xavier Noria2011-02-021-14/+13
| |
| * Merge branch 'master' of git://github.com/lifo/docrailsXavier Noria2011-02-021-5/+55
| |\
| | * Provide documentation for ActionController::MetalBernerd Schaefer2011-02-021-5/+55
| |/ |/|
| * If I want to set respond_body to nil then itNeeraj Singh2011-01-251-1/+1
|/ | | | | | | should be nil and not [nil]. If anything other than nil then wrap it in array Signed-off-by: José Valim <jose.valim@gmail.com>
* Fix a few bugs when trying to use Head standalonewycats2010-10-101-0/+5
|
* Fix tests on 1.9.2.José Valim2010-09-281-0/+1
|
* Initialize @_request and @_response.Emilio Tagua2010-09-271-1/+3
|
* added block arguments to ActionController::Metal#useCollin Miller2010-09-121-3/+3
| | | | | | | | | | | Useful for cases such as warden, where a block configuration is taken. class SomeController < ApplicationController use RailsWarden::Manager do |manager| manager.default_strategies :facebook_oauth manager.failure_app = SomeController.action(:authorize) end end
* Ensure that env is always available in controllersPiotr Sarnacki2010-09-031-1/+5
|
* cleanup of ActionController::Metal inline documentationJoost Baaij2010-08-261-15/+13
|
* Fixes for "router" and "routes" terminologyWincent Colaiuta2010-07-031-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | Commit f7ba614c2db improved the internal consistency of the different means of accessing routes, but it introduced some problems at the level of code comments and user-visible strings. This commit applies fixes on three levels: Firstly, we remove or replace grammatically invalid constructs such as "a routes" or "a particular routes". Secondly, we make sure that we always use "the router DSL" or "the router syntax", because this has always been the official terminology. Finally, we make sure that we only use "routes" when referring to the application-specific set of routes that are defined in the "config/routes.rb" file, we use "router" when referring on a more abstract level to "the code in Rails used to handle routing", and we use "routing" when we need an adjective to apply to nouns such as "url_helpers. Again this is consistent with historical practice and other places in the documentation. Note that this is not a sweep over the entire codebase to ensure consistent usage of language; it is just a revision of the changes introduced in commit f7ba614c2db. Signed-off-by: Wincent Colaiuta <win@wincent.com> Signed-off-by: José Valim <jose.valim@gmail.com>
* Unify routes naming by renaming router to routesPiotr Sarnacki2010-07-021-1/+1
| | | | Signed-off-by: José Valim <jose.valim@gmail.com>
* Fix controller_name for non default controller paths [#4901 state:resolved]knapo2010-06-231-1/+1
| | | | Signed-off-by: José Valim <jose.valim@gmail.com>
* Remove a relic of #request being in RackDelegationwycats2010-06-191-2/+9
|
* Add :only and :except to controllers MiddlewareStack. This allowsJosé Valim2010-05-301-3/+45
| | | | | | | | you to do the following: class PostsController < ApplicationController use AutheMiddleware, :except => [:index, :show] end
* Return a valid Rack response from bare ActionController::MetalCarlhuda2010-03-181-1/+7
|
* Eliminate warnings for AM on 1.8wycats2010-03-161-1/+5
|
* Simplify the action endpoint:Carlhuda2010-03-081-25/+9
| | | | | | | * Remove ActionEndpoint in favor of passing a block to MiddlewareStack * Always create a Request; the performance win of RackDelegation is around the response; the Request object hit is limited to a single object allocation * #dispatch takes a Request
* Add missing super call in AC::Metal. [#4085 status:resolved]José Valim2010-03-031-0/+1
|
* Update AP to start locking down a public API. This work is parallel to some ↵Yehuda Katz2010-02-161-0/+8
| | | | docs I'm working on.
* Convert to class_attributeJeremy Kemper2010-02-011-2/+7
|