Answer the question
In order to leave comments, you need to log in
How to properly build an application in py2exe?
Good afternoon!
Tell me where the error is, I figure out how to build an exe from python. I am using py2exe.
C:\Python27\python.exe setup.py py2exe
Answer the question
In order to leave comments, you need to log in
or filter directly in the query
Post
.where.not(id: @posts_hot.map(&:id))
.where.not(id: Post.where(post_block_id: 2)) # magic number anipattern. лучше заменить на константу
.where.not(id: Post.joins(:post_asset).where.not(post_asset: { quote: nil }))
.order(created_at: :desc)
.limit(15)
Post
.includes(:post_asset)
.where.not(id: @posts_hot.map(&:id))
.order(created_at: :desc)
.limit(15)
.select { |post| post.post_block_id != 2 }
.select { |post| post.post_asset.try :quote }
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question