Merge branch 'master' into mobile

This commit is contained in:
Neil Lalonde
2013-09-05 15:54:22 -04:00
133 changed files with 2458 additions and 1264 deletions

View File

@ -196,6 +196,16 @@ class ApplicationController < ActionController::Base
user
end
def post_ids_including_replies
post_ids = params[:post_ids].map {|p| p.to_i}
if params[:reply_post_ids]
post_ids << PostReply.where(post_id: params[:reply_post_ids].map {|p| p.to_i}).pluck(:reply_id)
post_ids.flatten!
post_ids.uniq!
end
post_ids
end
private
def preload_anonymous_data