Skip to content

Commit

Permalink
Clarify about model_classes in the example code
Browse files Browse the repository at this point in the history
  • Loading branch information
chauduongdominh-eh committed May 11, 2024
1 parent f372eeb commit a607c43
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions doc/code_order.rdoc
Expand Up @@ -91,9 +91,11 @@ unsafe runtime modification of the configuration:
model_classes.each(&:freeze)
DB.freeze

The `subclasses` plugin can be used to keep track of all model classes
that have been setup in your application. Finalizing their associations
and freezing them can easily be achieved through the plugin:
`model_classes` is not a Sequel method, it indicates an array of model
classes you defined. Instead of listing them manually, the `subclasses`
plugin can be used to keep track of all model classes that have been
setup in your application. Finalizing their associations and freezing
them can easily be achieved through the plugin:

# Register the plugin before setting up the models
Sequel::Model.plugin :subclasses
Expand Down

0 comments on commit a607c43

Please sign in to comment.