Skip to content

Commit

Permalink
Merge pull request wazery#51 from bookempire/feature/fix_association
Browse files Browse the repository at this point in the history
Fix error when reflecting on associations.
  • Loading branch information
wazery committed Nov 28, 2014
2 parents 3809197 + cbb40b5 commit 170ac92
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/ratyrate/model.rb
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@ def ratyrate_rateable(*dimensions)
:class_name => "Rate",
:as => :rateable

has_many "#{dimension}_raters".to_sym, :through => "#{dimension}_rates", :source => :rater
has_many "#{dimension}_raters".to_sym, :through => :"#{dimension}_rates", :source => :rater

has_one "#{dimension}_average".to_sym, -> { where dimension: dimension.to_s },
:as => :cacheable, :class_name => "RatingCache",
Expand Down

0 comments on commit 170ac92

Please sign in to comment.