I have a transaction controller, which is like most of my other controllers. But, this is giving me an error when trying to add a new record…
It’s trying to set the id, but before action is only for show, edit update & destroy?
before_action :set_transaction, only: [:show, :edit, :update, :destroy]
def set_transaction @transaction = Transaction.find(params[:transaction_id]) end