1
0
Fork 0
mirror of https://github.com/rails/rails.git synced 2022-11-09 12:12:34 -05:00

Merge branch 'master' into adequaterecord

* master:
  add services: memcache to travis
  The `source` option for `has_many => through` should accept String values.
This commit is contained in:
Aaron Patterson 2014-04-09 16:20:52 -07:00
commit c954a74ee2
3 changed files with 4 additions and 3 deletions

View file

@ -1,3 +1,4 @@
services: memcache
script: 'ci/travis.rb'
before_install:
- travis_retry gem install bundler

View file

@ -621,7 +621,7 @@ module ActiveRecord
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|

View file

@ -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'
has_many :tagged_posts, :through => :taggings, :source => 'taggable', :source_type => 'Post'
end