Topic: Displaying an event for today
Here's what I'm trying to do. I work at a university who needs to display who their resident director on duty is, and have it dynamically update whenever the date changes based on a table. Here's what I'm working with currently.
@current_rd = Rdod.today
find(:all, :conditions => ['date = ?', Date.today])
View (index.rhtml) has:
Hi, it's <%= @date.to_s(:long) %>.
<% for rdod in @current_rd -%>
Today's RD is <%= rdod.name %><br />
<%= rdod.date %><br /><% end %>
I added the display of the date just so I could make sure, but I plan on removing it from the view once it works. As of right now, this script displays only the current time at the top of the page, and no records even though I've entered one in for today and tommorow. Help? Thanks!
Last edited by kindablue (2007-01-15 10:17:31)