Sha256: 397c169a8d5d9f7165df2a98115e224e45a7516986f733bd741ef1df8dad62b4
Contents?: true
Size: 888 Bytes
Versions: 10
Compression:
Stored size: 888 Bytes
Contents
module Spree module Admin class StockMovementsController < Spree::Admin::BaseController respond_to :html helper_method :stock_location def index @stock_movements = stock_location.stock_movements.recent.page(params[:page]) end def new @stock_movement = stock_location.stock_movements.build end def create @stock_movement = stock_location.stock_movements.build(params[:stock_movement]) @stock_movement.save flash[:success] = flash_message_for(@stock_movement, :successfully_created) redirect_to admin_stock_location_stock_movements_path(stock_location) end def edit @stock_movement = StockMovement.find(params[:id]) end private def stock_location @stock_location ||= StockLocation.find(params[:stock_location_id]) end end end end
Version data entries
10 entries across 10 versions & 1 rubygems