Skip to content

Instantly share code, notes, and snippets.

@victorgiraldes
Created December 10, 2019 13:44
Show Gist options
  • Save victorgiraldes/58e329f05fa66ad58ae03b5e1d185341 to your computer and use it in GitHub Desktop.
Save victorgiraldes/58e329f05fa66ad58ae03b5e1d185341 to your computer and use it in GitHub Desktop.
def create
@operation = Supply::SupplyCreator.new(permitted_params[:supply])
@operation.company = current_company
@operation.user = current_user
@operation.perform
if @operation.succeeded?
redirect_to edit_bank_debit_path(@operation.supply.bank_debits.first, file: @file)
else
@supply = @operation.validator
render action: :new
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment