Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

find_rated_by(user) returns error in Rails 3 #3

Open
ReggieBeans opened this issue Jan 12, 2011 · 0 comments
Open

find_rated_by(user) returns error in Rails 3 #3

ReggieBeans opened this issue Jan 12, 2011 · 0 comments

Comments

@ReggieBeans
Copy link

I'm getting the following error:

irb(main):009:0> Article.find_rated_by(User.first)
   NoMethodError: undefined method `class_name_of_active_record_descendant' for ActiveRecord::Base:Class
    from C:/Ruby187/lib/ruby/gems/1.8/gems/activerecord-3.0.0/lib/active_record/base.rb:1016:in `method_missing'
    from C:/Users/rob/web/insite-rails-cms/vendor/plugins/jasherai-acts-as-rated/lib/acts_as_rated.rb:376:in `send'
    from C:/Users/rob/web/insite-rails-cms/vendor/plugins/jasherai-acts-as-rated/lib/acts_as_rated.rb:376:in `find_rated_by'
    from (irb):9

I can fix the error by changing line 376 in acts_as_rated.rb from:

rated_class = ActiveRecord::Base.send(:class_name_of_active_record_descendant, self).to_s

to:

rated_class = ActiveRecord::Base.send(:class_of_active_record_descendant, self).to_s
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant