Mark Dickson
Mark Dickson
I'm very late to this party too, but +1. In MySQL having the additional condition in the JOIN clause is *much* more efficient. In large tables, this results in remarkably...
It's also worth mentioning that the order here matters: ``` 44] pry(main)> Location.ransack(item_id_string_eq: 'AA').result.to_sql => "SELECT `locations`.* FROM `locations` WHERE CONVERT(locations.item_id, CHAR(8)) = 'AA'" [45] pry(main)> Location.ransack(warehouse_id_eq: 1, item_id_string_eq: 'AA').result.to_sql...
Last strange thing--it's only with with integer columns: ``` 8] pry(main)> Location.ransack(name_eq: 'AA', item_id_string_eq: 'AA').result.to_sql => "SELECT `locations`.* FROM `locations` WHERE ((`locations`.`name` = 'AA' AND CONVERT(locations.item_id, CHAR(8)) = 'AA'))" [49]...
I made some progress, but then ran into a few other issues that eventually proved too frustrating--I couldn't get my requests to authenticate, even just using pretty much vanilla config....
I should add that I had to setup a bit of a config hack to restrict Oauth application access (i.e. to the resource that created the application--in this case, a...