Skip to content

Instantly share code, notes, and snippets.

@andyh
Last active August 29, 2015 14:15
Show Gist options
  • Save andyh/fbbce5195654c027f3d0 to your computer and use it in GitHub Desktop.
Save andyh/fbbce5195654c027f3d0 to your computer and use it in GitHub Desktop.
jQuery ->
name = $("#user-welcome").data("name")
if name
alert name
<h3 id="user-welcome" data-name="<%= current_user.name %>">Welcome</h3>
<p><%= link_to 'Users:', users_path %> <%= User.count %> registered</p>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment