-
Notifications
You must be signed in to change notification settings - Fork 32
Open
Description
Apologies if this is possible and I've overlooked.
I'm struggling to understand why the custom Account#email=
method in the following does not get called:
require "spec"
require "clear"
class Account
include Clear::Model
column email : String
def email=(e : String)
super(email.downcase.strip)
end
end
describe Account do
it "overrides email setter" do
account = Account.new
account.email = "FOO@example.com "
account.email.should eq("foo@example.com")
end
end
Is there a better way of achieving this? Thanks!
Metadata
Metadata
Assignees
Labels
No labels