Sha256: ae1c5ae17e75d07210b7fe92d16f3297d80c7fde3747cf4619f39d4209f0d1d5
Contents?: true
Size: 1.23 KB
Versions: 36
Compression:
Stored size: 1.23 KB
Contents
class Spree::Admin::CurrencyPricesController < Spree::Admin::BaseController def index @currency_prices = CurrencyPrice.page(params[:page]||1).per(20) end def new @currency_price = CurrencyPrice.new @form_target = admin_currency_prices_path @form_method = :post end def create @currency_price = CurrencyPrice.new(params[:currency_price]) if @currency_price.save #cache_reset redirect_to admin_currency_prices_path, notice: 'Item was successfully created.' else @form_target = admin_currency_prices_path @form_method = :post render action: "new" end end def edit @currency_price = CurrencyPrice.find(params[:id]) @form_target = admin_currency_price_path(@currency_price) @form_method = :put end def update @currency_price = CurrencyPrice.find(params[:id]) if @currency_price.update_attributes(params[:currency_price]) #cache_reset redirect_to admin_currency_prices_path, notice: 'Item was successfully updated.' else @form_target = admin_currency_price_path(@currency_price) @form_method = :put render action: "edit" end end def destroy @currency_price = CurrencyPrice.find(params[:id]) @currency_price.destroy #cache_reset redirect_to admin_currency_prices_url end end
Version data entries
36 entries across 36 versions & 1 rubygems