rails joins and merge method in heroku postgres -
i having issue joins , merge method when app deployed heroku.
def self.get_gift_by_gender_age(c) result = self.where(:gender => [c.gender, "unisex"]).joins(:age_classifications).merge(ageclassification.by_age_range(c)) end this works fine in mysql returns no results in postgres. doesn't give me error don't know how trouble shoot it.
edit:
below query generated:
select "products".* "products" inner join "age_classifications" on "age_classifications"."product_id" = "products"."id" "products"."gender" in ('female', 'unisex') , "age_classifications"."age_range_id" = 1
Comments
Post a Comment