-1

I have just updated the ruby version of my project from ruby-2.0.0 to ruby-2.3.8. Now after update there seems to be a problem while using joins in rails and I am not getting why. Here is the code below.

class User < ActiveRecord::Base  
    has_many :items  
end

class Item < ActiveRecord::Base  
 belongs_to :user  
 has_many :donors, :as => :itemable, :dependent => :destroy  
end

u = User.find_by_id(15)  
u.items.joins(:donors)

it is returning me a Module object like '#<#Module<:0x00000000088932f0>:0x44497e8>', which is inaccessible

but the same thing when I do in my previous ruby version before updating

it gave me the ActiveRecord:: Relation object as expected

I am not getting the problem so if anybody can suggest something.

Ryan M
  • 18,333
  • 31
  • 67
  • 74
Arkit Agrawal
  • 11
  • 1
  • 3

1 Answers1

1

Thanks, for the efforts, Its was the rails version compatiblity issue. As I upgraded my rails version to 3.2.22.5 it got fixed.

Arkit Agrawal
  • 11
  • 1
  • 3