Module: Serega::SeregaPlugins::Preloads::AttributeInstanceMethods
- Defined in:
- lib/serega/plugins/preloads/preloads.rb
Overview
Serega::SeregaAttribute additional/patched instance methods
Instance Method Summary collapse
-
#hide ⇒ Boolean?
Patch for original
hide
method. -
#preloads ⇒ Hash?
Formatted preloads of current attribute.
-
#preloads_path ⇒ Array
Formatted preloads_path of current attribute.
Instance Method Details
#hide ⇒ Boolean?
Patch for original hide
method
Marks attribute hidden if auto_hide_attribute_with_preloads option was set and attribute has preloads
224 225 226 227 228 229 |
# File 'lib/serega/plugins/preloads/preloads.rb', line 224 def hide res = super return res unless res.nil? auto_hide_attribute_with_preloads? || nil end |
#preloads ⇒ Hash?
Returns formatted preloads of current attribute.
203 204 205 206 207 |
# File 'lib/serega/plugins/preloads/preloads.rb', line 203 def preloads return @preloads if defined?(@preloads) @preloads = get_preloads end |
#preloads_path ⇒ Array
Returns formatted preloads_path of current attribute.
210 211 212 213 214 |
# File 'lib/serega/plugins/preloads/preloads.rb', line 210 def preloads_path return @preloads_path if defined?(@preloads_path) @preloads_path = get_preloads_path end |