bullet
bullet copied to clipboard
Belongs_to Relation breaks the app
This works fine without Bullet.
class Registration < ActiveRecord::Base
has_many :members
end
class Member < ActiveRecord::Base
belongs_to :registration
end
And then when I run
Member.first.registration
It returns
NoMethodError: undefined method `each' for #<Registration:0x007fd3c721bea0>
from /Users/gotoAndBliss/.rvm/gems/ruby-2.2.2@whisper/gems/activemodel-4.0.13/lib/active_model/attribute_methods.rb:439:in `method_missing'
If I open up a rails c
, everything works as expected. This only fails when Bullet is being run in my development environment.
In fact, anything that is related to my registration
object returns the exact same failure. Yet all other relations work within my app.
config.after_initialize do
Bullet.enable = true
Bullet.alert = true
Bullet.bullet_logger = true
Bullet.console = true
end