Guest User

Untitled

a guest
Oct 22nd, 2018
80
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.30 KB | None | 0 0
  1. class Deal < ActiveRecord::Base
  2. include ActionView::Helpers::NumberHelper
  3.  
  4. (...)
  5.  
  6. def buyer_collection
  7. collection = (Investor.all + Company.all).map(&buyer_for_select)
  8. end
  9.  
  10. private
  11. def buyer_for_select
  12. lambda { |record| [record.name, "#{record.class.name}:#{record.id}"] }
  13. end
  14.  
  15. (...)
  16.  
  17. end
Add Comment
Please, Sign In to add comment