Class: Spree::Admin::GiftCardsController

Inherits:
BaseController
  • Object
show all
Defined in:
app/controllers/spree/admin/gift_cards_controller.rb

Instance Method Summary collapse

Instance Method Details

#indexObject



6
7
# File 'app/controllers/spree/admin/gift_cards_controller.rb', line 6

def index
end

#lookupObject



12
13
# File 'app/controllers/spree/admin/gift_cards_controller.rb', line 12

def lookup
end

#redeemObject



15
16
17
18
19
20
21
22
23
# File 'app/controllers/spree/admin/gift_cards_controller.rb', line 15

def redeem
  if @gift_card.redeem(@user)
    flash[:success] = Spree.t("admin.gift_cards.redeemed_gift_card")
    redirect_to admin_user_store_credits_path(@user)
  else
    flash[:error] = Spree.t("admin.gift_cards.errors.unable_to_redeem_gift_card")
    render :lookup
  end
end

#showObject



9
10
# File 'app/controllers/spree/admin/gift_cards_controller.rb', line 9

def show
end