Class: Koi::Helpers::AttributeTypes::DateType

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



97
98
99
# File 'lib/generators/koi/helpers/attribute_types.rb', line 97

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

#govuk_inputObject



85
86
87
# File 'lib/generators/koi/helpers/attribute_types.rb', line 85

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

#index_rowObject



89
90
91
# File 'lib/generators/koi/helpers/attribute_types.rb', line 89

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

#show_rowObject



93
94
95
# File 'lib/generators/koi/helpers/attribute_types.rb', line 93

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