I use rails 3.2.3 with over 100 models. The fact is that the application / directory model is too crowded. I organized the directory into several groups and added autoload_paths (for new subdirectories). I donβt want my models to use a namespace because it falls into several namespaces that are not suitable for development. Let them talk:
class Listing < ActiveRecord::Base
has_many :communications
end
class Communication < ActiveRecord::Base
end
In my rails console, it works for any models with an absolute reference, with the exception of activerecord associations. I can not name Listing.first.communications. I see that he is trying to download Listing :: Link, and it crashes because the contents of this file are Link (without a namespace).
LoadError: Expected /home/chamnap/my_app/app/models/listing/communication.rb to define Listing::Communication
? , Rails ?