Hi guys in Ruby on Rails I have a table with 7 columns such as Monday, Tuesday, Wednesday etc which hold times...
I want these columns to be assigned to an actual day of the week so that if its tuesday the 开发者_运维问答tuesday columns data(times) is rendered etc how do i go about doing this thanks in advance.
record.send(Time.now.strftime("%A").downcase)
This will call the day of the week ("sunday" through to "saturday") on whatever record
represents.
精彩评论