Sha256: 39b1e2a1d4aef3fd15740ce988874ad1e976296e1eeaa175b93c802058fe9f8e
Contents?: true
Size: 552 Bytes
Versions: 5
Compression:
Stored size: 552 Bytes
Contents
module Spree module Admin class StockItemsController < Spree::Admin::BaseController before_filter :determine_backorderable def update stock_item.save respond_to do |format| format.js { head :ok } end end private def stock_item @stock_item ||= StockItem.find(params[:id]) end def determine_backorderable stock_item.backorderable = params[:stock_item].present? && params[:stock_item][:backorderable].present? ? true : false end end end end
Version data entries
5 entries across 5 versions & 1 rubygems