lib/support/conversions.rb
def to_db
        if all?{ |x| x.respond_to?(:rid?)}  && any?( &:rid? )
          "["+ map{|x| x.rid? ? x.rid : x.to_or }.join(', ') + ']'
        else
          map(&:to_db) # .join(',')
        end
      end
# Class  extentions to manage to_db and from_db
Class  extentions to manage to_db and from_db
Class extentions to manage to_db and from_db
def to_db
        if all?{ |x| x.respond_to?(:rid?)}  && any?( &:rid? )
          "["+ map{|x| x.rid? ? x.rid : x.to_or }.join(', ') + ']'
        else
          map(&:to_db) 
        end
      end
def to_db if all? { | x | x . respond_to? ( :rid? ) } && any? ( & :rid? ) "[" + map { | x | x . rid? ? x . rid : x . to_or } . join ( ', ' ) + ']' else map ( & :to_db ) end end
Class  extentions to manage to_db and from_db
Class extentions to manage to_db and from_db
# .join(',')