Sha256: c5b9006ae002552d6048959012a91adea53b961ed7d0e34e2038d6d92b7acb3f
Contents?: true
Size: 446 Bytes
Versions: 35
Compression:
Stored size: 446 Bytes
Contents
class ReturnsController < ArtfullyOseController def create order = Order.find(params[:order_id]) items = params[:items].collect { |item_id| Item.find(item_id) } @return = Return.new(order, items) @return.submit if @return.successful? flash[:notice] = "Successfully returned #{@return.items.size} tickets." else flash[:error] = "Unable to return tickets." end redirect_to order_url(order) end end
Version data entries
35 entries across 35 versions & 1 rubygems