Reputation: 1
default_scope {where("valid = ? AND active = ? AND mrp > ?", false, true, 0)}
I am getting Column 'mrp' in where clause is ambiguous error
how do I make it less ambiguous. I tried it with product.mrp
Upvotes: 0
Views: 467
Reputation: 2034
Try this: default_scope {where("your_table_name.valid = ? AND your_table_name.active = ? AND your_table_name.mrp > ?", false, true, 0)}
Upvotes: 1