Q:

Ruby on Rails - show current date only

I'm creating a small lesson app, with a different lesson for each day. I'm wanting to show the current days lesson only on the index, and can't figure out how. I googled and found some info that came close, but still couldn't fix the problem. I only have one controller, DaysController. No user controller. 
For my model(day.rb) I've tried this 
class Day < ActiveRecord::Base
  validates :description, :date, :link_to, :presence => true
  scope :created_on, lambda {|date| {:conditions => ['created_at >= ? AND created_at <= ?', date.beginning_of_day, date.end_of_day]}}

  def self.today
    self.created_on(Date.today)
  end

end

And for my index I've tried these
  <% @day.created_on(Date.today) %>

  <% @day.today %>

any advice??

A:

If I understand correctly and for simplicity sake is this essentially what you are trying to achieve?
Controller:
def index
 @days = Day.all
end

View (index.html.erb):
<% @days.each do |day| %>
<% if day.created_at == Date.today %>
 <%= day.field_name %>
<% end %>

