Skip to content

Instantly share code, notes, and snippets.

@razenha
Created August 23, 2018 19:42
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save razenha/b429f2ff156ad6b0c30a7b794dfe199f to your computer and use it in GitHub Desktop.
Save razenha/b429f2ff156ad6b0c30a7b794dfe199f to your computer and use it in GitHub Desktop.
class ItemEstoque < AR
# id, produto, quantidade, custo_total
end
class LogEstoque < AR
# id, item_estoque, quantidade, custo_movimentacao, data
end
class RetirarEstoqueController < ApplicationController
def update
item_estoque_id = params[:item_estoque_id]
quantidade = params[:quantidade].to_f
data = params[:data].to_date
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment