Permalink
Browse files

Merge branch 'master' into adequaterecord

* master:
  add services: memcache to travis
  The `source` option for `has_many => through` should accept String values.
  • Loading branch information...
2 parents 89e569d + c7d009b commit c954a74ee280b99dd6e9aa1e9698cdee76d56214 @tenderlove tenderlove committed Apr 9, 2014
Showing with 4 additions and 3 deletions.
  1. +1 −0 .travis.yml
  2. +1 −1 activerecord/lib/active_record/reflection.rb
  3. +2 −2 activerecord/test/models/tag.rb
View
@@ -1,3 +1,4 @@
+services: memcache
script: 'ci/travis.rb'
before_install:
- travis_retry gem install bundler
@@ -621,7 +621,7 @@ def source_reflection_names
end
def source_reflection_name # :nodoc:
- return @source_reflection_name if @source_reflection_name
+ return @source_reflection_name.to_sym if @source_reflection_name
names = [name.to_s.singularize, name].collect { |n| n.to_sym }.uniq
names = names.find_all { |n|
@@ -3,5 +3,5 @@ class Tag < ActiveRecord::Base
has_many :taggables, :through => :taggings
has_one :tagging
- has_many :tagged_posts, :through => :taggings, :source => :taggable, :source_type => 'Post'
-end
+ has_many :tagged_posts, :through => :taggings, :source => 'taggable', :source_type => 'Post'
+end

0 comments on commit c954a74

Please sign in to comment.