Hi all, I am a newbie and just recently started to create apps with ruby on
rails so please go easy on me
I have an app which has a database in mysql which is called bus_times and
consists of 3 columns which are: id, time and weekday. Time is set to time
and weekday is a string. So it looks something like this:
What I want to do is to pick out the times from my database and show them on
my view depending on what the date is today. Hence assign my strings
mon,tues,wed etc to an actual date so like today is wednesday I want it to
pick out just the wednesday times. How do I do this I have looked everywhere
and cannot find a solution thanks in advance...
This helps me to get all the next available times on that day, can you see
what I am trying to do, I am trying to get the latest times available for a
bus on a particular day because sunday's times are different please could
you help thanks for the very quick reply
If it still gives you the same error, please look at the logs and check the SQL query running in the background, if it’s returning no records see what’s wrong in the query / database.