checkbox.rb 669 B

1234567891011121314151617181920212223242526272829
  1. # this require is required (hehe) because of Rails autoloading
  2. # which causes strange behavior not inheriting correctly
  3. # from Import::OTRS::DynamicField
  4. require_dependency 'import/zendesk/object_attribute/base'
  5. module Import
  6. class Zendesk
  7. module ObjectAttribute
  8. class Checkbox < Import::Zendesk::ObjectAttribute::Base
  9. def init_callback(_object_attribte)
  10. @data_option.merge!(
  11. default: false,
  12. options: {
  13. true => 'yes',
  14. false => 'no',
  15. },
  16. )
  17. end
  18. private
  19. def data_type(_attribute)
  20. 'boolean'
  21. end
  22. end
  23. end
  24. end
  25. end