diff --git a/Gemfile b/Gemfile index 38ea5ec32773cc1dbaf1c280cec69dca4815ef65..b5cf99adef43149ac23c38ff304315f216038499 100644 --- a/Gemfile +++ b/Gemfile @@ -9,9 +9,6 @@ gem 'chef', '0.9.12', :require => false gem 'nokogiri', '1.4.3.1' -gem "fog", '0.3.25' -gem "excon", "0.2.4" - #Security gem 'devise', '1.1.3' gem 'devise_invitable', :git => 'git://github.com/zhitomirskiyi/devise_invitable.git', :branch => '0.3.5' @@ -43,12 +40,16 @@ gem 'em-websocket', :git => 'git://github.com/igrigorik/em-websocket', :ref => ' #File uploading gem 'carrierwave', '0.5.2' +gem "fog", '0.3.25' +gem "excon", "0.2.4" gem 'mini_magick', '3.2' gem 'aws', '2.3.32' # upgrade to 2.4 breaks 1.8 >.< + gem 'fastercsv', '1.5.4', :require => false gem 'jammit', '0.5.4' gem 'rest-client', '1.6.1' gem 'typhoeus' + #Backups gem 'cloudfiles', '1.4.10', :require => false diff --git a/app/controllers/posts_controller.rb b/app/controllers/posts_controller.rb index c08143c36e0be7c97bc51ab2d1d86d27558822cd..a3b55ae917c538908fb0a34eec3eb49986fb46a1 100644 --- a/app/controllers/posts_controller.rb +++ b/app/controllers/posts_controller.rb @@ -11,17 +11,17 @@ class PostsController < ApplicationController def index if current_user - @posts = StatusMessage.joins(:aspects, :author).where(:pending => false + @posts = StatusMessage.joins(:aspects).where(:pending => false ).where(Aspect.arel_table[:user_id].eq(current_user.id).or(StatusMessage.arel_table[:public].eq(true)) ).select('DISTINCT `posts`.*') else - @posts = StatusMessage.joins(:author).where(:public => true, :pending => false) + @posts = StatusMessage.where(:public => true, :pending => false) end if params[:tag] @posts = @posts.tagged_with(params[:tag]) else - @posts = @posts.where(Person.arel_table[:owner_id].not_eq(nil)) + @posts = @posts.joins(:author).where(Person.arel_table[:owner_id].not_eq(nil)) end @posts = @posts.includes(:comments, :photos).paginate(:page => params[:page], :per_page => 15, :order => 'created_at DESC')