Class: Pageflow::Admin::MembershipsHelper::CollectionForParent

Inherits:
Object
  • Object
show all
Defined in:
app/helpers/pageflow/admin/memberships_helper.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(parent, options) ⇒ CollectionForParent

Returns a new instance of CollectionForParent.



21
22
23
24
# File 'app/helpers/pageflow/admin/memberships_helper.rb', line 21

def initialize(parent, options)
  @parent = parent
  @options = options
end

Instance Attribute Details

#optionsObject (readonly)

Returns the value of attribute options.



19
20
21
# File 'app/helpers/pageflow/admin/memberships_helper.rb', line 19

def options
  @options
end

#parentObject (readonly)

Returns the value of attribute parent.



19
20
21
# File 'app/helpers/pageflow/admin/memberships_helper.rb', line 19

def parent
  @parent
end

Instance Method Details

#pairsObject



26
27
28
29
30
# File 'app/helpers/pageflow/admin/memberships_helper.rb', line 26

def pairs
  items.each_with_object([]) do |item, result|
    result << [display(item), item.id]
  end
end