app/models/carnival/model_helper.rb in carnival-0.0.43 vs app/models/carnival/model_helper.rb in carnival-0.0.44
- old
+ new
@@ -17,7 +17,12 @@
else
select.concat all.collect{|c|[c.id, c.to_s]}
end
select
end
+
+ def to_label_options
+ label = column_names.select { |column| column.eql?("name")}
+ label.empty? ? column_names.fetch(1).to_sym : label.first.to_sym
+ end
end
end