class Post < Sequel::Model belongs_to :user validates_presence_of :email validates_presence_of :hidden end
post = Post.new :user => User.create post.valid? #=> false, that's good post.hidden = false post.valid? #=> false, should be true Upon fixing this, I suggest that Model#create and Model#save return a nil instead of a false on an unsuccessful save because: post = Post.new :public => false post.valid? #=> false, that's good post.user => User.create post.valid? #=> true, even if User.create failed and post.user == 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 -~----------~----~----~----~------~----~------~--~---
