Advertisement
Guest User

Untitled

a guest
Jun 30th, 2016
58
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.32 KB | None | 0 0
  1. scope :not_archived, where("=items.status != 'archived'").joins(:provider)
  2. ...
  3. scope I18n.t('scopes.all'), :not_archived
  4.  
  5. Mysql2::Error: Column 'id' in field list is ambiguous
  6. SELECT id FROM `items` INNER JOIN `providers` ON `providers`.`id` = `items`.`provider_id` WHERE `items`.`status` != 'archived'
  7.  
  8. except(:select)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement