Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Merge pull request #26 from thomas88/fix-relation-all-deprecation

Relation#all is deprecated in Rails 4, use Relation#to_a instead
  • Loading branch information...
commit ded2750a23b17fb6c021fb05321a2e7c4b51dd8e 2 parents fafd54e + 386c6af
@cmer authored
View
1  .travis.yml
@@ -1,6 +1,5 @@
language: ruby
rvm:
- - 1.9.2
- 1.9.3
- 2.0.0
View
4 lib/socialization/stores/active_record/follow.rb
@@ -66,7 +66,7 @@ def followers_relation(followable, klass, opts = {})
def followers(followable, klass, opts = {})
rel = followers_relation(followable, klass, opts)
if rel.is_a?(ActiveRecord::Relation)
- rel.all
+ rel.to_a
else
rel
end
@@ -92,7 +92,7 @@ def followables_relation(follower, klass, opts = {})
def followables(follower, klass, opts = {})
rel = followables_relation(follower, klass, opts)
if rel.is_a?(ActiveRecord::Relation)
- rel.all
+ rel.to_a
else
rel
end
View
4 lib/socialization/stores/active_record/like.rb
@@ -66,7 +66,7 @@ def likers_relation(likeable, klass, opts = {})
def likers(likeable, klass, opts = {})
rel = likers_relation(likeable, klass, opts)
if rel.is_a?(ActiveRecord::Relation)
- rel.all
+ rel.to_a
else
rel
end
@@ -92,7 +92,7 @@ def likeables_relation(liker, klass, opts = {})
def likeables(liker, klass, opts = {})
rel = likeables_relation(liker, klass, opts)
if rel.is_a?(ActiveRecord::Relation)
- rel.all
+ rel.to_a
else
rel
end
View
4 lib/socialization/stores/active_record/mention.rb
@@ -66,7 +66,7 @@ def mentioners_relation(mentionable, klass, opts = {})
def mentioners(mentionable, klass, opts = {})
rel = mentioners_relation(mentionable, klass, opts)
if rel.is_a?(ActiveRecord::Relation)
- rel.all
+ rel.to_a
else
rel
end
@@ -92,7 +92,7 @@ def mentionables_relation(mentioner, klass, opts = {})
def mentionables(mentioner, klass, opts = {})
rel = mentionables_relation(mentioner, klass, opts)
if rel.is_a?(ActiveRecord::Relation)
- rel.all
+ rel.to_a
else
rel
end
View
4 lib/socialization/stores/redis/base.rb
@@ -11,7 +11,7 @@ def actors(victim, klass, options = {})
result
end
else
- actors_relation(victim, klass, options).all
+ actors_relation(victim, klass, options).to_a
end
end
@@ -32,7 +32,7 @@ def victims(actor, klass, options = {})
result
end
else
- victims_relation(actor, klass, options).all
+ victims_relation(actor, klass, options).to_a
end
end
Please sign in to comment.
Something went wrong with that request. Please try again.