Coder Social home page Coder Social logo

spree_banner's Introduction

Spree Banner

Adds a way to manage banners to Spree Commerce [compatible with Amazon S3]

Installation

  1. Add the following to your Gemfile
gem 'spree_banner', '~> 2.0.0'
  1. Run bundle install

  2. To copy and apply migrations run:

rails g spree_banner:install

Configuration

Preferences can be updated within the admin panel under "Configuration" then "Banner box settings". Or you may set them with an initializer within your application:

SpreeBanner::Config.tap do |config|
  config.banner_styles = {"mini" => "48x48>", "small" => "100x100>", "large" => "800x200#"}.to_json.to_s
  config.banner_default_style = 'small'
end

Banner use example

  1. Add banner helper method in your view:
<%= insert_banner_box(category: "my_category") %>
  1. Additional options:
  :class => "my_class"
  :style => "my_style"
  :list = true|false

Copyright (c) 2012 [Damiano Giacomello], released under the New BSD License

spree_banner's People

Contributors

damdiginess avatar damjack avatar grzegorzblaszczyk avatar nebirhos avatar rdegan avatar tauil avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

spree_banner's Issues

No such file or directory @ rb_sysopen

I'm getting the following error when running the rails generator. I'm using Spree 2.4 which I'm guessing is the main issue here but I'd like to know how to go about this problem.

7ddf32e17a6ac5:crops_banners hades$ rails g spree_banner:install
      append  app/assets/javascripts/admin/all.js
/Users/username/.rvm/gems/ruby-2.1.5/gems/thor-0.19.1/lib/thor/actions/inject_into_file.rb:98:in `binread': No such file or directory @ rb_sysopen - /Users/username/RubymineProjects/spree_banners_app/app/assets/javascripts/admin/all.js (Errno::ENOENT)
    from /Users/username/.rvm/gems/ruby-2.1.5/gems/thor-0.19.1/lib/thor/actions/inject_into_file.rb:98:in `replace!'
    from /Users/username/.rvm/gems/ruby-2.1.5/gems/thor-0.19.1/lib/thor/actions/inject_into_file.rb:59:in `invoke!'
    from /Users/username/.rvm/gems/ruby-2.1.5/gems/thor-0.19.1/lib/thor/actions.rb:94:in `action'
    from /Users/username/.rvm/gems/ruby-2.1.5/gems/thor-0.19.1/lib/thor/actions/inject_into_file.rb:30:in `insert_into_file'
    from /Users/username/.rvm/gems/ruby-2.1.5/gems/thor-0.19.1/lib/thor/actions/file_manipulation.rb:180:in `append_to_file'
    from /Users/username/.rvm/gems/ruby-2.1.5/bundler/gems/spree_banner-b14044b13e12/lib/generators/spree_banner/install/install_generator.rb:6:in `add_javascripts'
    from /Users/username/.rvm/gems/ruby-2.1.5/gems/thor-0.19.1/lib/thor/command.rb:27:in `run'
    from /Users/username/.rvm/gems/ruby-2.1.5/gems/thor-0.19.1/lib/thor/invocation.rb:126:in `invoke_command'
    from /Users/username/.rvm/gems/ruby-2.1.5/gems/thor-0.19.1/lib/thor/invocation.rb:133:in `block in invoke_all'
    from /Users/username/.rvm/gems/ruby-2.1.5/gems/thor-0.19.1/lib/thor/invocation.rb:133:in `each'
    from /Users/username/.rvm/gems/ruby-2.1.5/gems/thor-0.19.1/lib/thor/invocation.rb:133:in `map'
    from /Users/username/.rvm/gems/ruby-2.1.5/gems/thor-0.19.1/lib/thor/invocation.rb:133:in `invoke_all'
    from /Users/username/.rvm/gems/ruby-2.1.5/gems/thor-0.19.1/lib/thor/group.rb:232:in `dispatch'
    from /Users/username/.rvm/gems/ruby-2.1.5/gems/thor-0.19.1/lib/thor/base.rb:440:in `start'
    from /Users/username/.rvm/gems/ruby-2.1.5/gems/railties-4.1.8/lib/rails/generators.rb:157:in `invoke'
    from /Users/username/.rvm/gems/ruby-2.1.5/gems/railties-4.1.8/lib/rails/commands/generate.rb:11:in `<top (required)>'
    from /Users/username/.rvm/gems/ruby-2.1.5/gems/polyglot-0.3.5/lib/polyglot.rb:65:in `require'
    from /Users/username/.rvm/gems/ruby-2.1.5/gems/polyglot-0.3.5/lib/polyglot.rb:65:in `require'
    from /Users/username/.rvm/gems/ruby-2.1.5/gems/activesupport-4.1.8/lib/active_support/dependencies.rb:247:in `block in require'
    from /Users/username/.rvm/gems/ruby-2.1.5/gems/activesupport-4.1.8/lib/active_support/dependencies.rb:232:in `load_dependency'
    from /Users/username/.rvm/gems/ruby-2.1.5/gems/activesupport-4.1.8/lib/active_support/dependencies.rb:247:in `require'
    from /Users/username/.rvm/gems/ruby-2.1.5/gems/railties-4.1.8/lib/rails/commands/commands_tasks.rb:135:in `generate_or_destroy'
    from /Users/username/.rvm/gems/ruby-2.1.5/gems/railties-4.1.8/lib/rails/commands/commands_tasks.rb:51:in `generate'
    from /Users/username/.rvm/gems/ruby-2.1.5/gems/railties-4.1.8/lib/rails/commands/commands_tasks.rb:40:in `run_command!'
    from /Users/username/.rvm/gems/ruby-2.1.5/gems/railties-4.1.8/lib/rails/commands.rb:17:in `<top (required)>'
    from bin/rails:4:in `require'
    from bin/rails:4:in `<main>'

couldn't find file 'formtastic'

After installing spree_banner on my Rails 3.2.3 and Spree (head) app, I try to access my admin module and I got:

couldn't find file 'formtastic'
(in /Users/eduardo/.rvm/gems/ruby-1.9.3-p125-perf@ifood/gems/spree_banner-1.0.4/app/assets/stylesheets/admin/spree_banner.css:3)

The head of spree_banner.css is written down below but there's no such file (formtastic.css)

/*
*= require admin/spree_core
*= require formtastic
*/

Greetings.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.