Skip to content

Instantly share code, notes, and snippets.

@mirrec
Created September 1, 2011 21:01
Show Gist options
  • Save mirrec/1187263 to your computer and use it in GitHub Desktop.
Save mirrec/1187263 to your computer and use it in GitHub Desktop.
data_pre = @object.send(token_type)
data_pre = [data_pre].map(&:attributes).to_json(:only => ["id", "name"]) if data_pre
text_field("#{token_type}_id", "data-pre" => data_pre)+
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment