Class: Koi::Helpers::AttributeTypes::IntegerType

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



61
62
63
# File 'lib/generators/koi/helpers/attribute_types.rb', line 61

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

#govuk_inputObject



49
50
51
# File 'lib/generators/koi/helpers/attribute_types.rb', line 49

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

#index_rowObject



53
54
55
# File 'lib/generators/koi/helpers/attribute_types.rb', line 53

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

#show_rowObject



57
58
59
# File 'lib/generators/koi/helpers/attribute_types.rb', line 57

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