Advertisement
albertodega

Untitled

Apr 28th, 2017
695
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. @user = User.joins("left join user_subscriptions on user_subscriptions.user_id = users.id left join film_tickets on film_tickets.user_id = users.id left join promotion_cards on film_tickets.promotion_card_id = promotion_cards.id")
  2.           .where('user_subscriptions.friendly_code ILIKE :kode or promotion_cards.card_code ILIKE :kode', kode: truncated_card_code)
  3.           .first
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement