We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 0be1a60 + 8505a60 commit 4e78ce6Copy full SHA for 4e78ce6
actionpack/lib/action_controller/metal/rendering.rb
@@ -160,6 +160,12 @@ def inherited(klass)
160
# render "posts/new", status: :unprocessable_entity
161
# # => renders app/views/posts/new.html.erb with HTTP status code 422
162
#
163
+ # `:variants`
164
+ # : This tells Rails to look for the first template matching any of the variations.
165
+ #
166
+ # render "posts/index", variants: [:mobile]
167
+ # # => renders app/views/posts/index.html+mobile.erb
168
169
#--
170
# Check for double render errors and set the content_type after rendering.
171
def render(*args)
0 commit comments