Skip to content

freego/spree_products_container

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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

About

Generic Product Container for Spree.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published