Class: Koi::Helpers::AttributeTypes::BooleanType

Inherits:
Base
  • Object
show all
Defined in:
lib/generators/koi/helpers/attribute_types.rb

Instance Attribute Summary

Attributes inherited from Base

#attribute

Instance Method Summary collapse

Methods inherited from Base

#initialize

Constructor Details

This class inherits a constructor from Koi::Helpers::AttributeTypes::Base

Instance Method Details

#collection_attributeObject



79
80
81
# File 'lib/generators/koi/helpers/attribute_types.rb', line 79

def collection_attribute
  %(attribute :#{attribute.name}, :boolean)
end

#govuk_inputObject



67
68
69
# File 'lib/generators/koi/helpers/attribute_types.rb', line 67

def govuk_input
  %(<%= form.govuk_check_box_field :#{attribute.name} %>)
end

#index_rowObject



71
72
73
# File 'lib/generators/koi/helpers/attribute_types.rb', line 71

def index_row
  %(<% row.boolean :#{attribute.name} %>)
end

#show_rowObject



75
76
77
# File 'lib/generators/koi/helpers/attribute_types.rb', line 75

def show_row
  %(<% row.boolean :#{attribute.name} %>)
end