active_type: incompatible with rails-5.0.0.beta2
The following code
class UserSession < ActiveType::Object
end
UserSession.new
generated
ActiveRecord::StatementInvalid: Could not find table 'objects'
error.
About this issue
- Original URL
- State: closed
- Created 8 years ago
- Reactions: 2
- Comments: 19 (9 by maintainers)
I’ll be looking into how to fix this for Rails 5 as well. The main issue is that Rails 5 already defines
#attributefor ActiveRecord. Hopfully, we can simply use that and just not run our own “virtual attributes” code on Rails 5.I’ve just released version 0.6.0, which should hopefully fix all the Rails 5 problems.
ActiveModeland Virtus works on rails 5.0.0.rc1. Maybe you guys should to take a look at Virtus.I added gemfiles/Gemfile.5.0.pg with the following:
Now I have tons of warnings and some failed specs to play with, nice!
Solved it. but there is another problem about type casting. I will work on that later…