阅读背景:

如何在CSS的Helper中使用==模型方法类?

来源:互联网 

calendar_helper

calendar_helper

def day_classes(day)
  classes = []
  classes.empty? ? nil : classes.join(" ")
  classes << "future" if day > Date.today # This make future days a white background, by default days are blue background
  # The Below Line Gives an Error (I want missed_dates date_missed to be red background): 
  classes << "missed" if day == current_user.missed_dates.group_by {|i| i.date_missed.to_date}
end
def day_cla



你的当前访问异常,请进行认证后继续阅读剩余内容。

分享到: