Module: LLM::ActiveRecord::ActsAsLLM::Hooks
- Defined in:
- lib/llm/active_record/acts_as_llm.rb
Class Method Summary collapse
-
.extended(model) ⇒ void
Called when hooks are extended onto an ActiveRecord model.
Class Method Details
.extended(model) ⇒ void
This method returns an undefined value.
Called when hooks are extended onto an ActiveRecord model.
40 41 42 43 44 |
# File 'lib/llm/active_record/acts_as_llm.rb', line 40 def self.extended(model) = model. model.validates [:provider_column], [:model_column], presence: true model.include InstanceMethods unless model.ancestors.include?(InstanceMethods) end |