Class: Backend::BankStatementItemsController

Inherits:
BaseController show all
Defined in:
app/controllers/backend/bank_statement_items_controller.rb

Instance Attribute Summary

Attributes inherited from ApplicationController

#current_theme

Instance Method Summary collapse

Methods inherited from BaseController

accounts_range_crit, crit_params, journal_entries_states_crit, journal_period_crit, journals_crit, search_conditions

Methods inherited from ApplicationController

#after_sign_in_path_for, #authorized?, human_action_name, #human_action_name

Instance Method Details

#newObject


3
4
5
6
7
8
9
10
11
12
# File 'app/controllers/backend/bank_statement_items_controller.rb', line 3

def new
  @bank_statement_item = BankStatementItem.new
  permitted_params = params.permit(:debit, :credit, :transfered_on, :letter, :name, :bank_statement_id)
  @bank_statement_item.attributes = permitted_params
  if request.xhr?
    render partial: 'reconciliation_row_form', object: @bank_statement_item
  else
    redirect_to_back
  end
end