Sha256: 5667bdc3c97d76566d1a32b34b67bb4646e407733fcf49f5d5ed1addd295b9b5

Contents?: true

Size: 568 Bytes

Versions: 1

Compression:

Stored size: 568 Bytes

Contents

module FieldTypes
  module Core
    class CheckboxCell < FieldTypes::Core::Cell
      def checkbox
        render
      end

      private

      def value
        if @model[:data].blank?
          false
        else
          @model[:data]["values"].include?(node_id) ? true : false
        end
      end

      def node_id
        @model[:node]['id'].to_s
      end

      def child_identifier
        @model[:child].to_s + " " + "->"
      end

      def display_lineage
        @model[:child].to_s + " " + @model[:node]["node"]["name"]
      end
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
cortex-field_types-core-0.1.0 app/cells/field_types/core/checkbox_cell.rb