jackdempsey / acts_as_commentable

The ActiveRecord acts_as_commentable plugin
http://juixe.com/svn/acts_as_commentable/
MIT License
834 stars 176 forks source link

ActiveRecord::Base.send(:class_name_of_active_record_descendant, self) #16

Closed CapyTheBeara closed 13 years ago

CapyTheBeara commented 13 years ago

Hi. I'm having problems with 'find_comments_by_user' in commentable_methods.rb. I'm getting:

NoMethodError: undefined method `class_name_of_active_record_descendant' for ActiveRecord::Base:Class

Looks like this method has been removed http://github.com/rails/rails/commit/a4f5f0547f205c6dbf264e8dadeb18492d5271ba#diff-0.

So instead of using ActiveRecord::Base.send(:class_name_of_active_record_descendant, self), should we use self.base_class.name?

jackdempsey commented 13 years ago

Hi monocle,

Crazy busy at the moment. It sounds like you have a good idea on the fix. Could you put that in a patch that I can test out?

thanks, jack

jackdempsey commented 13 years ago

Closing stale issue. Happy to accept any patches with tests. Thanks!