Tag Archives: collections

Easy Form Drop-Downs With Collection_Select

You have a sales-agent model that has a customer. You want a drop-down selection of all customers in the system, and you want to assign the customer ID to the sales agent. How do you do this? Rails has a collection_select helper for this–you pass in the model instance name, the collection, the ID field, the display field, and Rails handles the rest! Continue reading

Posted in Development | Tagged , | 8 Comments