app/seeders/basic_data/type_seeder.rb
def data
      colors = Color.all
      colors = colors.map { |c| { c.name =>  c.id } }.reduce({}, :merge)

      type_table.map do |_name, values|
        {
          name:                 I18n.t(values[5]),
          position:             values[0],
          is_default:           values[1],
          color_id:             colors[I18n.t(values[2])],
          is_in_roadmap:        values[3],
          is_milestone:         values[4]
        }
      end
    end
##
# Returns the data of all types to seed.
#
# @return [Array<Hash>] List of attributes for each type.
Returns the data of all types to seed.
Returns the data of all types to seed .
def data
      colors = Color.all
      colors = colors.map { |c| { c.name =>  c.id } }.reduce({}, :merge)
      type_table.map do |_name, values|
        {
          name:                 I18n.t(values[5]),
          position:             values[0],
          is_default:           values[1],
          color_id:             colors[I18n.t(values[2])],
          is_in_roadmap:        values[3],
          is_milestone:         values[4]
        }
      end
    end
def data colors = Color . all colors = colors . map { | c | { c . name => c . id } } . reduce ( { } , :merge ) type_table . map do | _name , values | { name : I18n . t ( values [ 5 ] ) , position : values [ 0 ] , is_default : values [ 1 ] , color_id : colors [ I18n . t ( values [ 2 ] ) ] , is_in_roadmap : values [ 3 ] , is_milestone : values [ 4 ] } end end
Returns the data of all types to seed.
Returns the data of all types to seed .
List of attributes for each type.
List of attributes for each type .
Array<Hash>