@@ -81,14 +81,14 @@ def build_middleware(klass, args, block)
81
81
#
82
82
# get 'hello', to: HelloController.action(:index)
83
83
#
84
- # The ` action` method returns a valid Rack application for the Rails router to
84
+ # The :: action method returns a valid Rack application for the Rails router to
85
85
# dispatch to.
86
86
#
87
87
# ## Rendering Helpers
88
88
#
89
- # `ActionController::Metal` by default provides no utilities for rendering
90
- # views, partials, or other responses aside from explicitly calling of
91
- # ` response_body=`, ` content_type=` , and ` status=` . To add the render helpers
89
+ # By default, `ActionController::Metal` provides no utilities for rendering
90
+ # views, partials, or other responses aside from some low-level setters such
91
+ # as # response_body=, # content_type=, and # status=. To add the render helpers
92
92
# you're used to having in a normal controller, you can do the following:
93
93
#
94
94
# class HelloController < ActionController::Metal
@@ -179,8 +179,33 @@ def controller_name
179
179
# Delegates to ActionDispatch::Response#headers.
180
180
delegate :headers , to : "@_response"
181
181
182
- delegate :status= , :location= , :content_type= ,
183
- :status , :location , :content_type , :media_type , to : "@_response"
182
+ ##
183
+ # Delegates to ActionDispatch::Response#status=
184
+ delegate :status= , to : "@_response"
185
+
186
+ ##
187
+ # Delegates to ActionDispatch::Response#location=
188
+ delegate :location= , to : "@_response"
189
+
190
+ ##
191
+ # Delegates to ActionDispatch::Response#content_type=
192
+ delegate :content_type= , to : "@_response"
193
+
194
+ ##
195
+ # Delegates to ActionDispatch::Response#status
196
+ delegate :status , to : "@_response"
197
+
198
+ ##
199
+ # Delegates to ActionDispatch::Response#location
200
+ delegate :location , to : "@_response"
201
+
202
+ ##
203
+ # Delegates to ActionDispatch::Response#content_type
204
+ delegate :content_type , to : "@_response"
205
+
206
+ ##
207
+ # Delegates to ActionDispatch::Response#media_type
208
+ delegate :media_type , to : "@_response"
184
209
185
210
def initialize
186
211
@_request = nil
@@ -201,7 +226,7 @@ def params=(val)
201
226
202
227
alias :response_code :status # :nodoc:
203
228
204
- # Basic url_for that can be overridden for more robust functionality.
229
+ # Basic ` url_for` that can be overridden for more robust functionality.
205
230
def url_for ( string )
206
231
string
207
232
end
0 commit comments