diff --git a/app/controllers/concerns/data_table.rb b/app/controllers/concerns/data_table.rb index 361b557c..09eb6ce9 100644 --- a/app/controllers/concerns/data_table.rb +++ b/app/controllers/concerns/data_table.rb @@ -80,7 +80,7 @@ def sanitize_params(params) length: params.require(:length).to_i, columns: {} } - params.require(:columns).each do |_, column| + params.require(:columns).each_value do |column| type, *values = column.require(:search)[:value].split(":") value = values.join(":") unless values.empty? h = clean[:columns][column.require(:data).to_sym] = { diff --git a/app/models/concerns/transaction_helpers.rb b/app/models/concerns/transaction_helpers.rb index de64f2cd..21707ed2 100644 --- a/app/models/concerns/transaction_helpers.rb +++ b/app/models/concerns/transaction_helpers.rb @@ -6,6 +6,8 @@ module TransactionHelpers def peer_of(user) return creditor if user == debtor return debtor if user == creditor + + raise "User is not a peer of this transaction" end def client_transaction?