-
-
Save scootcho/5244e1927e75c03d9ee7 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class ApplicationController < ActionController::Base | |
# stuff | |
private | |
# These groups are equivalent: | |
# | |
# render action: :new, locals: { item: x } | |
# render :new, locals: { item: x } | |
# locals :new, item: x | |
# | |
# render locals: { item: x } | |
# locals item: x | |
# | |
def locals(action = nil, hash) | |
render action: action, locals: hash | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment