-
-
Save jlong/1118832 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
# This should be in view_helpers.rb: | |
def logged_in? | |
boolean_param(:logged_in) | |
end | |
# my template code | |
<% unless logged_in? %> | |
<script type="text/javascript" charset="utf-8"> | |
alert('done') | |
</script> | |
<% end %> | |
# Now if you hit /template-name?logged_in=true the code above will not render |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment