I am using Rails and I have created my own team and user model.
I have specified it in models.rb file:
require './app/models/team.rb'
require './app/models/user'
require './app/models/question.rb'
If I have Team as an Active Record, then it says superclass mismatch.
class Team < ApplicationRecord
has_many :users
end
If I simply have it as a class, it doesn't provide with team.users function.
class Team
has_many :users
end
The above code throws exception saying that team.users function doesn't exist