Module: ShoppingCart::StandardFlashes

Extended by:
ActiveSupport::Concern
Included in:
OrdersController
Defined in:
app/controllers/concerns/shopping_cart/standard_flashes.rb

Instance Method Summary collapse

Instance Method Details

#create_order_failedObject



13
14
15
16
# File 'app/controllers/concerns/shopping_cart/standard_flashes.rb', line 13

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

#update_error(obj) ⇒ Object



9
10
11
# File 'app/controllers/concerns/shopping_cart/standard_flashes.rb', line 9

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

#updated_notice(obj) ⇒ Object



5
6
7
# File 'app/controllers/concerns/shopping_cart/standard_flashes.rb', line 5

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