Re: sequel error handeling


On Sunday 31 May 2009 05:44:54 am jeljer te Wies wrote:

but how can i get that error ? … i tried (as you can see):
return true … etc …

but that doesn’t work :frowning: ( obviously) …
i googled, read the cheatsheet, readme etc etc.
irc doesn’t respond so … hopefully you guys know!!..

thanxs :smiley:

You’ll probably get better responses from the sequel list:

However, I’m not exactly sure why you define a create method when it is
provided for you through Sequel::Model.

w = => ‘’)

This will generate an exception if already exists. If you
want that model, whether it has been created previously or not,

w = Website.find_or_create(:name => ‘’)

The methods relating to this you are probably looking for are here:

Hope that helps.