Dear all,

if I have model class :
class Category < Sequel::Model(:categories)
def validate
errors.add(:name, "must not empty") if name.empty?
 end
end


then how I catch error from validate? Is it by adding rescue? Where to put?

Category.create do |c|
  c.name = ""
end


Thank you

Regards
Hendra

-- 
Suka linux?
Kunjungi blog saya http://penguinroad.blogspot.com

-- 
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.

Reply via email to