Class: Koi::Helpers::AttributeTypes::DatetimeType

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

#govuk_input, #initialize

Constructor Details

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

Instance Method Details

#collection_attributeObject



111
112
113
# File 'lib/generators/koi/helpers/attribute_types.rb', line 111

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

#index_rowObject



103
104
105
# File 'lib/generators/koi/helpers/attribute_types.rb', line 103

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

#show_rowObject



107
108
109
# File 'lib/generators/koi/helpers/attribute_types.rb', line 107

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