Class: SupplierSharesController

Inherits:
ApplicationController show all
Defined in:
app/controllers/supplier_shares_controller.rb

Instance Method Summary collapse

Methods inherited from ApplicationController

current

Methods included from PathHelper

#finance_group_transactions_path

Instance Method Details

#createObject



4
5
6
7
8
9
# File 'app/controllers/supplier_shares_controller.rb', line 4

def create
  @supplier = Supplier.find(params[:supplier_id])
  @supplier.update_attribute(:external_uuid, SecureRandom.uuid)

  render 'update'
end

#destroyObject



11
12
13
14
15
16
# File 'app/controllers/supplier_shares_controller.rb', line 11

def destroy
  @supplier = Supplier.find(params[:supplier_id])
  @supplier.update_attribute(:external_uuid, nil)

  render 'update'
end