Sha256: f7e657d2bf7bd1fda01205300d1bab92bf575393bf59c972314b991c4f852c0b

Contents?: true

Size: 414 Bytes

Versions: 3

Compression:

Stored size: 414 Bytes

Contents

module ShoppingCart
  module StandardFlashes
    extend ActiveSupport::Concern

    def updated_notice obj
      flash[:notice] = t('flash.updated', obj: obj)
    end

    def update_error obj
      flash[:error] = t('flash.not_updated', obj: obj)
    end

    def create_order_failed
      flash[:error] = t('cart.create_order_failed')
      redirect_back(fallback_location: main_app.root_path)
    end
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
shopping-cart-0.1.2 app/controllers/concerns/shopping_cart/standard_flashes.rb
shopping-cart-0.1.1 app/controllers/concerns/shopping_cart/standard_flashes.rb
shopping-cart-0.1.0 app/controllers/concerns/shopping_cart/standard_flashes.rb