Skip to content

Instantly share code, notes, and snippets.

@Sporky023
Created August 11, 2011 20:50
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 Sporky023/1140732 to your computer and use it in GitHub Desktop.
Save Sporky023/1140732 to your computer and use it in GitHub Desktop.
> tagging = Tagging.create(:post => Post.first, :tag => Tag.first)
(rdb:1) irb
irb(...):001:0> klass
=> Tagging(id: integer, tag_id: integer, post_id: integer, created_at: datetime, updated_at: datetime)
irb(...):002:0> attribute
=> :tag
irb(...):004:0> klass.columns_hash.keys
=> ["id", "tag_id", "post_id", "created_at", "updated_at"]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment