A Spree extension that provides ability to add useful notes to orders, products, users or any other spree table.
- It includes ability to configure the note settings from admin panel.
- Add notes to orders, products and users.
- Easy to extend to add notes to any spree table.
-
Add this extension to your Gemfile with this line:
gem 'spree_notes'
-
Install the gem using Bundler
bundle install
-
Copy & run migrations
bundle exec rails g spree_notes:install
-
Restart your server!
If your server was running, restart it so that it can find the assets properly.
-
Added association for notes to new class
has_many :notes, as: :notable
-
For adding additional options for noteables, we can override the method
noteable_klasses
fromSpree::NoteHelper
def noteable_klasses legacy_klasses = super legacy_klasses << Spree::NewKlass end
-
For adding sidebar tab of notes, feel free to create deface override with reference.
-
Add
notes.html.erb
as view template for new class with reference.
First bundle your dependencies, then run rake
. rake
will default to building the dummy app if it does not exist, then it will run specs. The dummy app can be regenerated by using rake test_app
.
bundle update
bundle exec rake
When testing your applications integration with this extension you may use it's factories. Simply add this require statement to your spec_helper:
require 'spree_notes/factories'
Copyright (c) 2022 Spree Edge. released under the New BSD License