Thank you Chris, that will get me started to implement a nice DRY search
solution for my models.

On Wed, Nov 16, 2011 at 11:18 AM, Chris Corbyn <[email protected]> wrote:

> No dramas :)
>
> >
> > And how would I enum all properties on a model? Oh wait I guess I can
> see how that is done in the source of dm myself.
>
> SomeModel.properties.each { |p| … }
>
> You can get all those that have :searchable set by doing:
>
> SomeModel.properties.select { |p| p.options[:searchable] }
>
>
> --
> You received this message because you are subscribed to the Google Groups
> "DataMapper" 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/datamapper?hl=en.
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"DataMapper" 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/datamapper?hl=en.

Reply via email to