def has_many(name)
      @config.root or raise NotImplementedError, "nested associations are not supported"
      @config.has_manys[name.to_sym] ||= Config.new
      yield self.class.new config: @config.has_manys[name.to_sym], root: false

      nil
    end
def has_many(name)
      @config.root or raise NotImplementedError, "nested associations are not supported"
      @config.has_manys[name.to_sym] ||= Config.new
      yield self.class.new config: @config.has_manys[name.to_sym], root: false

      nil
    end
Define a one to many association. Expect a name and a block to
 define the fields on associated records.

 For example:

   define_csv_fields do |c|
     has_many 'reviews' do |r|
       r.field :id, :name, :_destroy
     end
   end