开发者

How to assign columns as dates in rails

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.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜