python (65.2k questions)
javascript (44.3k questions)
reactjs (22.7k questions)
java (20.8k questions)
c# (17.4k questions)
html (16.3k questions)
r (13.7k questions)
android (13k questions)
How to solve the ActiveRecord::RecordInvalid error when creating a factory?
I have a model
class Income < ApplicationRecord
belongs_to :income_type
has_one :order
validates_associated :income_type
validates_presence_of :income_type
I create a factory for her
Fac...
Mceeev
Votes: 0
Answers: 1
Puzzle: ActiveRecord object is persisted but cannot be retrieved with find
I am experiencing a head-scratcher in a non-Rails app using AR that I cannot figure out. I will simplify greatly, but here is the essence: I have a Download object that belongs to a Ledger. In one o...
Daniel Doherty
Votes: 0
Answers: 2
Devise user creation through FactoryBot leaking to development
I am trying to test my app which contains some Devise models (one of them being User)
And I have found a peculiar behavior as my app was by chance running in the background (in development environment...
Maxence
Votes: 0
Answers: 0
Records disappear during Rails tests when calling PORO (transaction issue?)
I have an existing application (Rails 6) with a set of tests (minitest). I've just converted my tests to use factory_bot instead of fixtures but I'm having a strange problem with records created and c...
JohnP
Votes: 0
Answers: 1