Connect Forest to your ActiveRecord models with support for relationships and Live Query
The ActiveRecord datasource enables importing collections from all model classes extending ActiveRecord::Base. It automatically respects your ActiveRecord relationships and configurations.
The id and type fields of polymorphic relationships remain visible in the interface. Hide them through back-end customization or frontend configuration if desired.
Limitations
Collections
Removal: Cannot delete collections that serve as polymorphic relationship targets; attempting this raises: “Cannot remove because it’s a potential target of polymorphic relation”
Renaming: Cannot rename collections involved in polymorphic relationships; error states: “Cannot rename collection because it’s a target of a polymorphic relation”
Fields
Removal: Cannot delete fields (foreign_key_type, foreign_key_id) used in polymorphic relationships
Renaming: Cannot rename fields involved in these relationships
Computed Fields: Cannot use polymorphic relationships as dependencies for computed fields due to unpredictable target collections
Search
Extended search functionality skips polymorphic relationships to prevent excessive resource consumption, generating debug logs about this behavior. Implement custom search behavior via documentation.