spree_notes
spree_notes copied to clipboard
A spree extension that provides ability to add notes to any table.
Spree Notes
About
A Spree extension that provides ability to add useful notes to orders, products, users or any other spree table.
Key Features
- 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.
Demo

Installation
-
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.
Configure new class as noteable
-
Added association for notes to new class
has_many :notes, as: :notable -
For adding additional options for noteables, we can override the method
noteable_klassesfromSpree::NoteHelperdef 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.erbas view template for new class with reference.
Testing
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'
Contributing
Copyright (c) 2022 Spree Edge. released under the New BSD License