Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- members = involvements.find(:all,
- :conditions => ['year=? AND type=? and user_id is not null', year, 'Member'],
- :include => [:user],
- :order => "users.last_name ASC, users.first_name ASC")
- volunteers = involvements.find(:all,
- :conditions => ['year=? AND type=? and user_id is not null', year, 'Volunteer'],
- :include => [:user],
- :order => "users.last_name ASC, users.first_name ASC")
- parents = members.collect { |m| m.user.parents }.flatten.sort { |a, b| "#{a.last_name} #{a.first_name}" <=> "#{b.last_name} #{b.first_name}" }.uniq
Add Comment
Please, Sign In to add comment