Class: AssocOptions
- Inherits:
-
Object
- Object
- AssocOptions
- Defined in:
- lib/railz_lite/models/associatable.rb
Direct Known Subclasses
Instance Attribute Summary collapse
-
#class_name ⇒ Object
Returns the value of attribute class_name.
-
#foreign_key ⇒ Object
Returns the value of attribute foreign_key.
-
#primary_key ⇒ Object
Returns the value of attribute primary_key.
Instance Method Summary collapse
Instance Attribute Details
#class_name ⇒ Object
Returns the value of attribute class_name.
5 6 7 |
# File 'lib/railz_lite/models/associatable.rb', line 5 def class_name @class_name end |
#foreign_key ⇒ Object
Returns the value of attribute foreign_key.
5 6 7 |
# File 'lib/railz_lite/models/associatable.rb', line 5 def foreign_key @foreign_key end |
#primary_key ⇒ Object
Returns the value of attribute primary_key.
5 6 7 |
# File 'lib/railz_lite/models/associatable.rb', line 5 def primary_key @primary_key end |
Instance Method Details
#model_class ⇒ Object
11 12 13 |
# File 'lib/railz_lite/models/associatable.rb', line 11 def model_class class_name.constantize end |
#table_name ⇒ Object
15 16 17 |
# File 'lib/railz_lite/models/associatable.rb', line 15 def table_name model_class.table_name end |