module EasyPatch
  module BoolFormatPatch

    def self.included(base)
      base.send(:include, InstanceMethods)

      base.class_eval do

        self.type_for_inline_edit = 'select'

      end
    end

    module InstanceMethods

      def source_values_for_inline_edit(custom_field_value)
        possible_values_options(custom_field_value.custom_field).map do |possible_value|
          { text: possible_value.first, value: possible_value.last }
        end
      end

    end

  end
end
