Created
July 16, 2009 02:48
-
-
Save lantins/148124 to your computer and use it in GitHub Desktop.
works in 1.8 but not 1.9?
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| def self.all_for_select(customer = nil) | |
| vehicles = self.filter(:customer_id => customer.id) | |
| select_options = [nil => "-- VEHICLE SELECTION --"] | |
| vehicles.each do |vehicle| | |
| select_options << {vehicle.serial_number, vehicle.name} | |
| end | |
| return select_options | |
| end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment