Skip to content

Instantly share code, notes, and snippets.

@kzaitsev
Last active August 29, 2015 14:02
Show Gist options
  • Save kzaitsev/6234311b327c26c13925 to your computer and use it in GitHub Desktop.
Save kzaitsev/6234311b327c26c13925 to your computer and use it in GitHub Desktop.
example.rb
hash = {lists: @lists}
hash.merge!(default: @lists.index(@default_list)) if @default_list
hash.to_json
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment