ActsAsNotable is a rails 5+ plugin for note any model
# user note product
class User < ActiveRecord::Base
acts_as_noter
end
class Product < ActiveRecord::Base
acts_as_notable
end
user.note('This is an awesome product.', product) # create
user.un_note(product) # del
user.renote('This is an awesome product.', product) # edit
user.notes_of(product) # query
# product.notes_by(user)
Add this line to your application's Gemfile:
gem 'acts_as_notable', github: 'zhulux/acts_as_notable'
And then execute:
./bin/rails g acts_as_notable:install
Contribution directions go here.
The gem is available as open source under the terms of the MIT License.