My table (postgres):
CREATE TABLE user
(
id serial NOT NULL,
name character varying(100) NOT NULL,
CONSTRAINT user_pkey PRIMARY KEY (id)
)
My model:
class User< Sequel::Model(:user)
end
I tried:
>> u = User.new
=> #<User #values={}>
>> u.name = nil
=> Sequel::InvalidValue: nil/NULL is not allowed for the name column
Why it's validating before I call u.valid? ?
I think it should work like this:
>> u = User.new
=> #<User #values={}>
>> u.name = nil
>> u.valid?
=> false
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"sequel-talk" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/sequel-talk?hl=en
-~----------~----~----~----~------~----~------~--~---