Join GitHub today
GitHub is home to over 20 million developers working together to host and review code, manage projects, and build software together.
Counter Cache when using STI throws: You have a nil object when you didn't expect it! #18
The model uses Single Table Inheritance. If the type column is blank, the issue does not occur.
You have a nil object when you didn't expect it!
The problem seems to stem from using self.class.counter_cache_options