app/models/run.rb
# to hash array element of which is pair array [key, value]
# necessary to recover hash after selected
to hash array element of which is pair array [key, value]
necessary to recover hash after selected
to hash array element of which is pair array [ key value ] necessary to recover hash after selected
def to_h
    blank? and return {}
    inject({}) do |sum, a|
      key, rest = *a
      sum.merge! key => rest
    end
  end
def to_h blank? and return { } inject ( { } ) do | sum , a | key , rest = * a sum . merge! key => rest end end
to hash array element of which is pair array [key, value]
necessary to recover hash after selected
to hash array element of which is pair array [ key value ] necessary to recover hash after selected