Generic Product Container for Spree.
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
app
bin
config
db/migrate
lib
spec
.gitignore
Gemfile
LICENSE
README.md
Rakefile
spree_products_container.gemspec

README.md

SpreeProductsContainer

Easily generate (multiple) resources than contain products.

Installation

Add spree_products_container to your Gemfile:

gem 'spree_products_container', github: 'freego/spree_products_container', branch: 'X-X-stable'

Bundle your dependencies and run the installation generator:

bundle
bundle exec rails g spree_products_container:install

Usage

Generate a new Look resource:

$ rails generate spree_products_container:resource look

Example output:

create  app/models/spree/look.rb
create  app/controllers/spree/admin/looks_controller.rb
create  app/overrides/spree/layouts/admin/add_spree_looks.html.erb.deface
append  config/routes.rb
create  config/locales/en_looks.yml
create  config/locales/it_looks.yml

Then run the migration:

$ rake db:migrate

To rollback:

$ rake db:rollback
$ rails destroy spree_products_container:resource look

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
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_products_container/factories'

Copyright (c) 2015 Alessandro Lepore, released under the New BSD License