Advertisement
Guest User

Untitled

a guest
Feb 28th, 2017
64
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.25 KB | None | 0 0
  1. @tags = @tags.joins(:posts)
  2. .select('posts.post_type AS post_type')
  3. .where('posts.post_type = ?', type) # type - string переменная
  4. #.having('posts.post_type = ?', type)
  5. .group('posts.post_type')
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement