Guest User

Untitled

a guest
Jul 21st, 2018
98
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.23 KB | None | 0 0
  1. # select version
  2. WeekDay.all.select {|day| application.option_1.week_days.include?(day)}.each{|day| puts day[0..1]}
  3.  
  4. # map version
  5. puts WeekDay.all.map {|day| day[0..1] if application.option_1.week_days.include?(day)}.compact.join("\n")
Add Comment
Please, Sign In to add comment