class BinData::DSLMixin::DSLParser
def to_choice_params
def to_choice_params if fields.length == 0 {} elsif fields.all_field_names_blank? {:choices => fields.collect { |f| f.prototype }} else choices = {} fields.each { |f| choices[f.name] = f.prototype } {:choices => choices} end end