My favorites | Sign in
Project Home Downloads Wiki Issues Source
Project Information
Members
Featured
Wiki pages

== Usage

  • Make you ActiveRecord model act as noteable.
class Model < ActiveRecord::Base
acts_as_noteable
end
  • Add a note to a model instance
model = Model.new note = Comment.new note.body = 'Some comment' model.notes << note
  • Each note references a noteable object
model = Model.find(1) model.notes.get(0).noteable == model

Powered by Google Project Hosting