class Interview::DatetimeAttribute

Attributes

format[RW]

Protected Instance Methods

build_read(b) click to toggle source
# File lib/interview/controls/datetime_attribute.rb, line 8
def build_read(b)
  return if value.nil?
  if @format
    b.text text: value.strftime(@format)
  else
    b << h.l(value)
  end
end
build_write(b) click to toggle source
# File lib/interview/controls/datetime_attribute.rb, line 17
def build_write(b)
  b << form_builder.date_select(@method) # todo: , {}, {class: 'form-control'}
end