Skip to content

Instantly share code, notes, and snippets.

@abachman
Created April 22, 2010 14:47
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 abachman/375318 to your computer and use it in GitHub Desktop.
Save abachman/375318 to your computer and use it in GitHub Desktop.
class Notable < ActiveRecord::Base
self.abstract_class = true
has_many :notes, :as => :notable
accepts_nested_attributes_for :notes
end
class User < Notable
end
class Book < Notable
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment