Skip to content
 
 

Repository files navigation

SpreeFavorites

Code Climate Build Status

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.

Installation

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

Testing

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'

TODO

  • Rewrite add/remove links to use data attributes, and unobtrusive javascript to send requests to an API controller.

Credits

Inspired by https://github.com/vinsol/spree_favorite_products

Copyright (c) 2014 Jeff Dutil, released under the New BSD License

About

Add Spree::Favorite model to track favorite products or anything else you would like.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages