Sha256: a901ea05bdc540c783fdaba844bc9b904dd620311f79d52d0f9ae84312c824b7
Contents?: true
Size: 494 Bytes
Versions: 1
Compression:
Stored size: 494 Bytes
Contents
module Harpiya class CurrencyController < StoreController def set new_currency = params[:switch_to_currency]&.upcase if new_currency.present? && supported_currency?(new_currency) current_order&.update(currency: new_currency) session[:currency] = new_currency end respond_to do |format| format.html { redirect_back fallback_location: harpiya.root_path(currency: new_currency) } format.json { head :ok } end end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
harpiya_frontend-4.3.0.alpha | app/controllers/harpiya/currency_controller.rb |