Skip to content

Instantly share code, notes, and snippets.

@Will-Sommers
Created October 16, 2016 19:37
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Will-Sommers/6f9074187ac1b24bd6ef71f482b4f128 to your computer and use it in GitHub Desktop.
Save Will-Sommers/6f9074187ac1b24bd6ef71f482b4f128 to your computer and use it in GitHub Desktop.
def application_props
{
routes: { user: { new: "/..." } },
special_integer: 42
}
end
def react_props!(obj)
application_props.merge(obj.as_json).to_json
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment