-
-
Save xhezairbey/f8b39bd37e93b4697a9e to your computer and use it in GitHub Desktop.
This file contains hidden or 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