Class: Magicka::Display

Inherits:
Aggregator show all
Defined in:
lib/magicka/display.rb

Overview

Class responsible for controlling one object display

Instance Attribute Summary

Attributes inherited from Aggregator

#model

Instance Method Summary collapse

Methods inherited from Aggregator

#equal?, #except, #initialize, #only, with_element, #with_model

Methods included from Aggregator::ClassMethods

#type, #with_element

Constructor Details

This class inherits a constructor from Magicka::Aggregator

Instance Method Details

#button(**_args) ⇒ NilClass

Noop

Used to not render a button when using display and not form

Returns:

  • (NilClass)


17
# File 'lib/magicka/display.rb', line 17

def button(**_args); end

#input(field, model: self.model, **options) ⇒ ActionView::OutputBuffer

Parameters:

  • field (String, Symbol)

    field to be shown

  • model (String) (defaults to: self.model)

    model being rendered (when omited, use the aggregator model)

  • options (Hash)

Returns:

  • (ActionView::OutputBuffer)

See Also:



# File 'lib/magicka/display.rb', line 19

#select(field, model: self.model, **options) ⇒ ActionView::OutputBuffer

Parameters:

  • field (String, Symbol)

    field to be shown

  • model (String) (defaults to: self.model)

    model being rendered (when omited, use the aggregator model)

  • options (Hash)

Returns:

  • (ActionView::OutputBuffer)

See Also:



# File 'lib/magicka/display.rb', line 31