#2 ✓resolved

Add joins to conditions

Reported by cesidio | September 22nd, 2008 @ 01:29 PM

If we need to add joins tables to our search query, it would be nice to benefit of Searchgasm cleaner way of specifing conditions. like in the following:

@posts = Post.all(:joins => :blog, :conditions => ['blog.url = ?', "http://.."])

it would became:

@posts = Post.all(:joins => :blog, :conditions => {:blog => {:url_contains => "url"}})

this is not a good example because it is evident that there would be a belongs_to relationship between Post and Blog, but let's just put the case there isn't

Comments and changes to this ticket

Please Sign in or create a free account to add a new ticket.

With your very own profile, you can contribute to projects, track your activity, watch tickets, receive and update tickets through your email and much more.

New-ticket Create new ticket

Create your profile

Help contribute to this project by taking a few moments to create your personal profile. Create your profile ยป

Provides common named scopes and object based searching.

People watching this ticket