Class: RademadeAdmin::Model::Info::Relation
- Inherits:
-
Object
- Object
- RademadeAdmin::Model::Info::Relation
- Defined in:
- lib/rademade_admin/model/info/relation.rb,
lib/rademade_admin/model/info/relation/gallery.rb
Direct Known Subclasses
Defined Under Namespace
Classes: Gallery
Instance Attribute Summary collapse
-
#foreign_key ⇒ Object
readonly
Returns the value of attribute foreign_key.
-
#from ⇒ Object
readonly
Returns the value of attribute from.
-
#getter ⇒ Object
readonly
Returns the value of attribute getter.
-
#name ⇒ Object
readonly
Returns the value of attribute name.
-
#setter ⇒ Object
readonly
Returns the value of attribute setter.
-
#sortable_field ⇒ Object
readonly
Returns the value of attribute sortable_field.
-
#to ⇒ Object
readonly
Returns the value of attribute to.
-
#type ⇒ Object
readonly
Returns the value of attribute type.
Instance Method Summary collapse
- #gallery? ⇒ Boolean
- #has_many? ⇒ Boolean
- #many? ⇒ Boolean
- #related_entities(ids) ⇒ Object
- #sortable? ⇒ Boolean
Instance Attribute Details
#foreign_key ⇒ Object (readonly)
Returns the value of attribute foreign_key.
7 8 9 |
# File 'lib/rademade_admin/model/info/relation.rb', line 7 def foreign_key @foreign_key end |
#from ⇒ Object (readonly)
Returns the value of attribute from.
7 8 9 |
# File 'lib/rademade_admin/model/info/relation.rb', line 7 def from @from end |
#getter ⇒ Object (readonly)
Returns the value of attribute getter.
7 8 9 |
# File 'lib/rademade_admin/model/info/relation.rb', line 7 def getter @getter end |
#name ⇒ Object (readonly)
Returns the value of attribute name.
7 8 9 |
# File 'lib/rademade_admin/model/info/relation.rb', line 7 def name @name end |
#setter ⇒ Object (readonly)
Returns the value of attribute setter.
7 8 9 |
# File 'lib/rademade_admin/model/info/relation.rb', line 7 def setter @setter end |
#sortable_field ⇒ Object (readonly)
Returns the value of attribute sortable_field.
7 8 9 |
# File 'lib/rademade_admin/model/info/relation.rb', line 7 def sortable_field @sortable_field end |
#to ⇒ Object (readonly)
Returns the value of attribute to.
7 8 9 |
# File 'lib/rademade_admin/model/info/relation.rb', line 7 def to @to end |
#type ⇒ Object (readonly)
Returns the value of attribute type.
7 8 9 |
# File 'lib/rademade_admin/model/info/relation.rb', line 7 def type @type end |
Instance Method Details
#gallery? ⇒ Boolean
21 22 23 |
# File 'lib/rademade_admin/model/info/relation.rb', line 21 def gallery? @is_gallery end |
#has_many? ⇒ Boolean
9 10 11 |
# File 'lib/rademade_admin/model/info/relation.rb', line 9 def has_many? @has_many end |
#many? ⇒ Boolean
13 14 15 |
# File 'lib/rademade_admin/model/info/relation.rb', line 13 def many? @many end |
#related_entities(ids) ⇒ Object
25 26 27 |
# File 'lib/rademade_admin/model/info/relation.rb', line 25 def (ids) RademadeAdmin::Model::Graph.instance.model_info(to).query_adapter.find(ids) end |
#sortable? ⇒ Boolean
17 18 19 |
# File 'lib/rademade_admin/model/info/relation.rb', line 17 def sortable? @sortable end |