Hi,

I have creating a few dataset methods with def_dataset_method and want
to also have those methods available to the model. Is this possible? I
have a feeling this may be built-in, but can't figure it out.

e.g.:

Post <  Sequel::Model
  def_dataset_method(:hide)
    update(:status => 'unpublished')
  end
end

So this works:
  Post.filter(:name => 'old').hide
But I'm also looking for this:
  Post[2342].hide

To get both of these working, do I need to create a separate instance
method for 'hide'?

Thanks.

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