Merge pull request #3376 from stevenh512/rails-3-2-6
Update Rails to 3.2.6
This commit is contained in:
commit
01449f765e
5 changed files with 34 additions and 33 deletions
2
Gemfile
2
Gemfile
|
|
@ -3,7 +3,7 @@ source 'http://rubygems.org'
|
||||||
gem 'bundler', '> 1.1.0'
|
gem 'bundler', '> 1.1.0'
|
||||||
ruby '1.9.3' if ENV['HEROKU']
|
ruby '1.9.3' if ENV['HEROKU']
|
||||||
|
|
||||||
gem 'rails', '3.2.5'
|
gem 'rails', '3.2.6'
|
||||||
|
|
||||||
gem 'foreman', '0.46'
|
gem 'foreman', '0.46'
|
||||||
|
|
||||||
|
|
|
||||||
50
Gemfile.lock
50
Gemfile.lock
|
|
@ -41,12 +41,12 @@ GEM
|
||||||
remote: http://rubygems.org/
|
remote: http://rubygems.org/
|
||||||
specs:
|
specs:
|
||||||
SystemTimer (1.2.3)
|
SystemTimer (1.2.3)
|
||||||
actionmailer (3.2.5)
|
actionmailer (3.2.6)
|
||||||
actionpack (= 3.2.5)
|
actionpack (= 3.2.6)
|
||||||
mail (~> 2.4.4)
|
mail (~> 2.4.4)
|
||||||
actionpack (3.2.5)
|
actionpack (3.2.6)
|
||||||
activemodel (= 3.2.5)
|
activemodel (= 3.2.6)
|
||||||
activesupport (= 3.2.5)
|
activesupport (= 3.2.6)
|
||||||
builder (~> 3.0.0)
|
builder (~> 3.0.0)
|
||||||
erubis (~> 2.7.0)
|
erubis (~> 2.7.0)
|
||||||
journey (~> 1.0.1)
|
journey (~> 1.0.1)
|
||||||
|
|
@ -54,21 +54,21 @@ GEM
|
||||||
rack-cache (~> 1.2)
|
rack-cache (~> 1.2)
|
||||||
rack-test (~> 0.6.1)
|
rack-test (~> 0.6.1)
|
||||||
sprockets (~> 2.1.3)
|
sprockets (~> 2.1.3)
|
||||||
activemodel (3.2.5)
|
activemodel (3.2.6)
|
||||||
activesupport (= 3.2.5)
|
activesupport (= 3.2.6)
|
||||||
builder (~> 3.0.0)
|
builder (~> 3.0.0)
|
||||||
activerecord (3.2.5)
|
activerecord (3.2.6)
|
||||||
activemodel (= 3.2.5)
|
activemodel (= 3.2.6)
|
||||||
activesupport (= 3.2.5)
|
activesupport (= 3.2.6)
|
||||||
arel (~> 3.0.2)
|
arel (~> 3.0.2)
|
||||||
tzinfo (~> 0.3.29)
|
tzinfo (~> 0.3.29)
|
||||||
activerecord-import (0.2.9)
|
activerecord-import (0.2.9)
|
||||||
activerecord (~> 3.0)
|
activerecord (~> 3.0)
|
||||||
activerecord (~> 3.0)
|
activerecord (~> 3.0)
|
||||||
activeresource (3.2.5)
|
activeresource (3.2.6)
|
||||||
activemodel (= 3.2.5)
|
activemodel (= 3.2.6)
|
||||||
activesupport (= 3.2.5)
|
activesupport (= 3.2.6)
|
||||||
activesupport (3.2.5)
|
activesupport (3.2.6)
|
||||||
i18n (~> 0.6)
|
i18n (~> 0.6)
|
||||||
multi_json (~> 1.0)
|
multi_json (~> 1.0)
|
||||||
acts_as_api (0.4)
|
acts_as_api (0.4)
|
||||||
|
|
@ -320,14 +320,14 @@ GEM
|
||||||
rack
|
rack
|
||||||
rack-test (0.6.1)
|
rack-test (0.6.1)
|
||||||
rack (>= 1.0)
|
rack (>= 1.0)
|
||||||
rails (3.2.5)
|
rails (3.2.6)
|
||||||
actionmailer (= 3.2.5)
|
actionmailer (= 3.2.6)
|
||||||
actionpack (= 3.2.5)
|
actionpack (= 3.2.6)
|
||||||
activerecord (= 3.2.5)
|
activerecord (= 3.2.6)
|
||||||
activeresource (= 3.2.5)
|
activeresource (= 3.2.6)
|
||||||
activesupport (= 3.2.5)
|
activesupport (= 3.2.6)
|
||||||
bundler (~> 1.0)
|
bundler (~> 1.0)
|
||||||
railties (= 3.2.5)
|
railties (= 3.2.6)
|
||||||
rails-i18n (0.6.4)
|
rails-i18n (0.6.4)
|
||||||
i18n (~> 0.5)
|
i18n (~> 0.5)
|
||||||
rails_admin (0.0.3)
|
rails_admin (0.0.3)
|
||||||
|
|
@ -345,9 +345,9 @@ GEM
|
||||||
sass-rails (~> 3.1)
|
sass-rails (~> 3.1)
|
||||||
rails_autolink (1.0.9)
|
rails_autolink (1.0.9)
|
||||||
rails (~> 3.1)
|
rails (~> 3.1)
|
||||||
railties (3.2.5)
|
railties (3.2.6)
|
||||||
actionpack (= 3.2.5)
|
actionpack (= 3.2.6)
|
||||||
activesupport (= 3.2.5)
|
activesupport (= 3.2.6)
|
||||||
rack-ssl (~> 1.3.2)
|
rack-ssl (~> 1.3.2)
|
||||||
rake (>= 0.8.7)
|
rake (>= 0.8.7)
|
||||||
rdoc (~> 3.4)
|
rdoc (~> 3.4)
|
||||||
|
|
@ -525,7 +525,7 @@ DEPENDENCIES
|
||||||
rack-piwik
|
rack-piwik
|
||||||
rack-rewrite (~> 1.2.1)
|
rack-rewrite (~> 1.2.1)
|
||||||
rack-ssl
|
rack-ssl
|
||||||
rails (= 3.2.5)
|
rails (= 3.2.6)
|
||||||
rails-i18n
|
rails-i18n
|
||||||
rails_admin (~> 0.0.3)
|
rails_admin (~> 0.0.3)
|
||||||
rails_autolink
|
rails_autolink
|
||||||
|
|
|
||||||
|
|
@ -69,10 +69,10 @@ class Contact < ActiveRecord::Base
|
||||||
|
|
||||||
def contacts
|
def contacts
|
||||||
people = Person.arel_table
|
people = Person.arel_table
|
||||||
incoming_aspects = Aspect.joins(:contacts).where(
|
incoming_aspects = Aspect.where(
|
||||||
:user_id => self.person.owner_id,
|
:user_id => self.person.owner_id,
|
||||||
:contacts_visible => true,
|
:contacts_visible => true).joins(:contacts).where(
|
||||||
:contacts => {:person_id => self.user.person.id}).select('aspects.id')
|
:contacts => {:person_id => self.user.person.id}).select('aspects.id')
|
||||||
incoming_aspect_ids = incoming_aspects.map{|a| a.id}
|
incoming_aspect_ids = incoming_aspects.map{|a| a.id}
|
||||||
similar_contacts = Person.joins(:contacts => :aspect_memberships).where(
|
similar_contacts = Person.joins(:contacts => :aspect_memberships).where(
|
||||||
:aspect_memberships => {:aspect_id => incoming_aspect_ids}).where(people[:id].not_eq(self.user.person.id)).select('DISTINCT people.*')
|
:aspect_memberships => {:aspect_id => incoming_aspect_ids}).where(people[:id].not_eq(self.user.person.id)).select('DISTINCT people.*')
|
||||||
|
|
|
||||||
|
|
@ -71,7 +71,8 @@ class Person < ActiveRecord::Base
|
||||||
# @note user is passed in here defensively
|
# @note user is passed in here defensively
|
||||||
scope :all_from_aspects, lambda { |aspect_ids, user|
|
scope :all_from_aspects, lambda { |aspect_ids, user|
|
||||||
joins(:contacts => :aspect_memberships).
|
joins(:contacts => :aspect_memberships).
|
||||||
where(:contacts => {:user_id => user.id}, :aspect_memberships => {:aspect_id => aspect_ids})
|
where(:contacts => {:user_id => user.id}).
|
||||||
|
where(:aspect_memberships => {:aspect_id => aspect_ids})
|
||||||
}
|
}
|
||||||
|
|
||||||
scope :unique_from_aspects, lambda{ |aspect_ids, user|
|
scope :unique_from_aspects, lambda{ |aspect_ids, user|
|
||||||
|
|
@ -81,10 +82,10 @@ class Person < ActiveRecord::Base
|
||||||
#not defensive
|
#not defensive
|
||||||
scope :in_aspects, lambda { |aspect_ids|
|
scope :in_aspects, lambda { |aspect_ids|
|
||||||
joins(:contacts => :aspect_memberships).
|
joins(:contacts => :aspect_memberships).
|
||||||
where(:contacts => { :aspect_memberships => {:aspect_id => aspect_ids}})
|
where(:aspect_memberships => {:aspect_id => aspect_ids})
|
||||||
}
|
}
|
||||||
|
|
||||||
scope :profile_tagged_with, lambda{|tag_name| joins(:profile => :tags).where(:profile => {:tags => {:name => tag_name}}).where('profiles.searchable IS TRUE') }
|
scope :profile_tagged_with, lambda{|tag_name| joins(:profile => :tags).where(:tags => {:name => tag_name}).where('profiles.searchable IS TRUE') }
|
||||||
|
|
||||||
scope :who_have_reshared_a_users_posts, lambda{|user|
|
scope :who_have_reshared_a_users_posts, lambda{|user|
|
||||||
joins(:posts).where(:posts => {:root_guid => StatusMessage.guids_for_author(user.person), :type => 'Reshare'} )
|
joins(:posts).where(:posts => {:root_guid => StatusMessage.guids_for_author(user.person), :type => 'Reshare'} )
|
||||||
|
|
|
||||||
|
|
@ -5,7 +5,7 @@ class TagFollowing < ActiveRecord::Base
|
||||||
validates_uniqueness_of :tag_id, :scope => :user_id
|
validates_uniqueness_of :tag_id, :scope => :user_id
|
||||||
|
|
||||||
def self.user_is_following?(user, tagname)
|
def self.user_is_following?(user, tagname)
|
||||||
tagname.nil? ? false : joins(:tag).where(:tags => {:name => tagname.downcase}, :user_id => user.id).exists?
|
tagname.nil? ? false : joins(:tag).where(:tags => {:name => tagname.downcase}).where(:user_id => user.id).exists?
|
||||||
end
|
end
|
||||||
|
|
||||||
end
|
end
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue