app/controllers/transactions_controller.rb
# `sanitize_params` deletes a few inaccessible transaction
# attributes from the params hash
`sanitize_params` deletes a few inaccessible transaction
attributes from the params hash
` sanitize_params ` deletes a few inaccessible transaction attributes from the params hash
def sanitize_params
    if params[:transaction].present?
      %w[user_id year].each { |atr| params[:transaction].delete(atr) }
    end
  end
def sanitize_params if params [ :transaction ] . present? %w[ user_id year ] . each { | atr | params [ :transaction ] . delete ( atr ) } end end
`sanitize_params` deletes a few inaccessible transaction
attributes from the params hash
` sanitize_params ` deletes a few inaccessible transaction attributes from the params hash