Guest User

Untitled

a guest
Feb 20th, 2018
70
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.20 KB | None | 0 0
  1. class Customer
  2. def self.options_for_select
  3. all.collect do |customer|
  4. [customer.formatted_for_option, customer.id]
  5. end
  6. end
  7.  
  8. def formatted_for_option
  9. "#{id}: #{title}"
  10. end
  11. end
Add Comment
Please, Sign In to add comment