I use Ruby on Rails to create a website for the game I play.
I have a User model and a Starbase model. The connection I'm trying to set up looks like this:
class User < ActiveRecord::Base has_many :starbases end class Starbase < ActiveRecord::Base belongs_to :user end
However, when I open the script / console and try to access the older categories of users, this gives me an error: NameError: uninitialized constant User::Starbasis .
This seems to be a kink problem and the rails are not pluralizing sprockets.
I tried adding this to the inflections.rb file in the intializers folder:
ActiveSupport::Inflector.inflections do |inflect| inflect.plural 'starbase', 'starbases' end
but he still does not solve the problem. Can anyone give some advice on how to do this?
Greetings
Eef
source share