Sha256: 1ea849f79192e87fce16c3fba4961ce87554ae27390d7d4d59a9c36239a69821
Contents?: true
Size: 643 Bytes
Versions: 4
Compression:
Stored size: 643 Bytes
Contents
class IndexPresenter < TypeStation::Presenter presents :page form_field :title, type: :text, label: 'Title' form_field :template_name, type: :select, label: 'Section template', options: -> { model; [['blank', 'blank_index'], ['YEAH', 'eay'],['Cool', 'v'], ['Blah', 'b']] } form_field :test_b, type: :text, label: 'Test', default: 'ssss', required: true form_field :tags, type: 'multiple_select', label: 'Tags', options: -> { [['Tag 1', 'tag_1'], ['Tag 2', 'tag_2']] } form_field :description, type: :textarea, label: 'description' def sections page.children end def teams Team.where(parent_id: page.id) end end
Version data entries
4 entries across 4 versions & 1 rubygems