This extension adds the ability to favorite products, and can be entended to favorite anything you would like with the Spree::Favorite's favorable polymorphic extension.
Add spree_favorites to your Gemfile:
gem 'spree_favorites', github: 'JDutil/spree_favorites'
For older versions of spree.
# Spree 2.2.x
gem 'spree_favorites', github: 'JDutil/spree_favorites', branch: '2-2-stable'
Bundle your dependencies and run the installation generator:
bundle
bundle exec rails g spree_favorites:install
Be sure to bundle your dependencies and then create a dummy test app for the specs to run against.
bundle
bundle exec rake test_app
bundle exec rspec spec
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_favorites/factories'
- Rewrite add/remove links to use data attributes, and unobtrusive javascript to send requests to an API controller.
Inspired by https://github.com/vinsol/spree_favorite_products
Copyright (c) 2014 Jeff Dutil, released under the New BSD License