Class: Koi::Helpers::AttributeTypes::StringType

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



43
44
45
# File 'lib/generators/koi/helpers/attribute_types.rb', line 43

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

#govuk_inputObject



31
32
33
# File 'lib/generators/koi/helpers/attribute_types.rb', line 31

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

#index_rowObject



35
36
37
# File 'lib/generators/koi/helpers/attribute_types.rb', line 35

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

#show_rowObject



39
40
41
# File 'lib/generators/koi/helpers/attribute_types.rb', line 39

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