-
Notifications
You must be signed in to change notification settings - Fork 228
Class not getting initialized #368
Copy link
Copy link
Open
Description
I have a normal class in my Rails 5 app:
class Routine < ApplicationRecord
belongs_to :user
end
irb: a= Routine.new(:elevation => 2343)
=> #<Routine:0x007ff2a19c2ea8
elevation: 2343
But when I add the Virtus gem the class doesn't get initialized:
class Routine < ApplicationRecord
include Virtus.model
belongs_to :user
attribute :elevation, Integer
end
irb: ad = Routine.new(:elevation => 133)
=>< Routine:0x007ff29e860e78 not initialized>
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels