Created
December 9, 2016 17:51
-
-
Save begin29/14cb1a4fb54a9ce8e586eca2766d0ef4 to your computer and use it in GitHub Desktop.
check if local variable is defined in view
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
render "shared/header", { :headline => "Welcome", :person => person } | |
# shared/header | |
<% if local_assigns.has_key? :headline %> | |
Headline: <%= headline %> | |
<% end %> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment