module ActiveRecord class Base def self.to_select(conditions = nil) find(:all).collect { |x| [x.name,x.id] } end end end class Array def to_select self.collect { |x| [x.name,x.id] } end end
You need to create an account or log in to post comments to this site.