> > I'm not sure what problem you're trying to solve with an approach like
> > this, but a quick test confirms that a query such as:
>
> > select response
> > from paths
> > where '/users/1234' similar to path
>
> > would actually work.  Of course, it will require setting up a custom
> > sql condition, but that's not really a huge deal.
>
> I'd be interested in getting a bit more information about what sort of
> custom SQL condition
> or customized index is required to get this to work.

In Rails 2.x, you would do something like:

Path.find(:first, :conditions => ['? similar to path', accessed_path])

I haven't had to do custom SQL conditions in Rails 3.x yet so I can't
help with that.  I'm also not sure what kind of index you'd use to
query like that, the PostgreSQL mailing list would be a better place
to ask.

Jim Crate

-- 
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: 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/rubyonrails-talk?hl=en.

Reply via email to