lib/upgrow/model.rb in upgrow-0.0.4 vs lib/upgrow/model.rb in upgrow-0.0.5

- old
+ new

@@ -1,9 +1,10 @@ # frozen_string_literal: true require_relative 'active_record_schema' require_relative 'basic_model' +require_relative 'naming' module Upgrow # Models are objects that represent core entities of the app's business logic. # These are usually persisted and can be fetched and created as needed. They # have unique keys for identification (usually a numeric value), and, most @@ -25,10 +26,10 @@ def inherited(subclass) super subclass.schema = ActiveRecordSchema.new( - "#{subclass.name}Record", subclass.schema + Naming.model_to_record(subclass.name), subclass.schema ) end end end end