I just started playing with rails this week and am working on porting
existing website to rails
in our navigation we have a list that has the days of the week that link
the articles for those days.
this seems to be working when I had it in the template it would give me
array I was looking for so I decided to move it to the helper so that I
could use it on all my templates.
days = Array.new
for i in 1…8
d = Time.local(t.year,t.month,t.day-i)
#n = d.to_i
today = d.strftime("%A")
I know this is not correct but it is what I am looking to do.
when the above code was in the template minus the def these lines would
out the error about converting strings to integers.
I am coming from about 7 years of php background so go easy on me
Thanks for your help