Sha256: 27117ce62cba1583817073e517cb1ae54b3cf7ef6a175db4ac9c97d87ba3ca56
Contents?: true
Size: 680 Bytes
Versions: 3
Compression:
Stored size: 680 Bytes
Contents
module Trole::ActiveRecord class Config < Troles::Common::Config def initialize subject_class, options = {} super end def configure_relation case strategy when :ref_one belongs_to_for subject_class, object_model, :key => main_field has_many_for object_model, subject_class when :embed_one raise "EmbedOne is currently not supported by the Active Record adapter. It will be soon..." #clazz.send(:embeds_many, role_model_key, :class_name => role_model_class_name) end end # AR sets this up ont its own using DB Table info def configure_field end end end
Version data entries
3 entries across 3 versions & 1 rubygems
Version | Path |
---|---|
troles-0.6.0 | lib/trole/adapters/active_record/config.rb |
troles-0.5.2 | lib/trole/adapters/active_record/config.rb |
troles-0.5.1 | lib/trole/adapters/active_record/config.rb |