Class: Troles::ActiveRecord::Config
- Inherits:
-
Common::Config
- Object
- Common::Config
- Troles::ActiveRecord::Config
- Defined in:
- lib/troles/adapters/active_record/config.rb
Instance Attribute Summary
Attributes inherited from Common::Config
#auto_relations, #generic, #log_on, #orm, #strategy, #subject_class
Instance Method Summary collapse
-
#configure_field ⇒ Object
AR sets this up ont its own using DB Table info.
- #configure_relation ⇒ Object
-
#initialize(subject_class, options = {}) ⇒ Config
constructor
A new instance of Config.
Methods inherited from Common::Config
#apply_options!, #auto_config, auto_config, auto_config?, #auto_config?, #auto_config_setings, auto_load?, #configure!, #default_role_field, #generic?, #log_on?, log_on?, #role_field, #role_field=, #singularity, sub_modules
Constructor Details
#initialize(subject_class, options = {}) ⇒ Config
Returns a new instance of Config.
4 5 6 |
# File 'lib/troles/adapters/active_record/config.rb', line 4 def initialize subject_class, = {} super end |
Instance Method Details
#configure_field ⇒ Object
AR sets this up ont its own using DB Table info
21 22 |
# File 'lib/troles/adapters/active_record/config.rb', line 21 def configure_field end |
#configure_relation ⇒ Object
8 9 10 11 12 13 14 15 16 17 18 |
# File 'lib/troles/adapters/active_record/config.rb', line 8 def configure_relation case strategy when :join_ref_many configure_join_model when :ref_many return configure_join_model if join_model has_and_belongs_many subject_class, object_model, :key => :accounts when :embed_many raise "Embed many configuration not yet implemented for ActiveRecord" end end |