Class: Presentation::Details

Inherits:
Grid
  • Object
show all
Defined in:
lib/presentation/details.rb

Overview

TODO: abstract what’s common between Record and Grid into a shared module or reusable objects or something

Instance Attribute Summary collapse

Attributes inherited from Grid

#id

Attributes inherited from Base

#controller, #presentable

Instance Method Summary collapse

Methods inherited from Grid

#colspan, #links, #links=, #paginate?, #record_links, #record_links=

Methods inherited from Base

#render

Methods included from Presenting::Configurable

#initialize

Instance Attribute Details

#titleObject

The display title for this presentation. Will default based on the id.



9
10
11
# File 'lib/presentation/details.rb', line 9

def title
  @title
end

Instance Method Details

#fieldsObject



17
18
19
# File 'lib/presentation/details.rb', line 17

def fields
  @fields ||= Presenting::FieldSet.new(Presenting::Attribute, :name, :value)
end

#fields=(args) ⇒ Object



11
12
13
14
15
# File 'lib/presentation/details.rb', line 11

def fields=(args)
  args.each do |field|
    self.fields << field
  end
end

#inameObject



6
# File 'lib/presentation/details.rb', line 6

def iname; :details end