Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- @tags = @tags.joins(:posts)
- .select('posts.post_type AS post_type')
- .where('posts.post_type = ?', type) # type - string переменная
- #.having('posts.post_type = ?', type)
- .group('posts.post_type')
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement