Hello everyone.
I have two models:
ItemType and PropertyType, they are connect with HABTM relation.
But this code doesn't work:
PropertyType.find(:all, :conditions => ["item_type_id != ?", existing_type_id])
I have error:
Mysql::Error: Unknown column 'item_type_id' in 'where clause': SELECT * FROM `property_types` WHERE (item_type_id != '3')
How to solve this? I want to find all PropertyTypes where item_type_id != "some_id"