Forum: Ruby on Rails Displaying events On calendar Cell , Like Backpack

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
Sanjay (Guest)
on 2009-01-24 15:11
(Received via mailing list)
Hi Geeks,

I have been struggling ahrd to show events on a calendar cells.
I used the calendar_helper plugin and defined a todo scaffold


The controller is:

def index

    @todos = current_user.todos
   @todo_by_date=@todos.find_all_by_due(start_date)

      respond_to do |format|
      format.html # index.html.erb
      format.xml  { render :xml => @todos }
    end
  end

error faced when the view is

<%=calendar(:year => @year, :month => @month ) do |d|
@todo_by_date.body
end%>

ERROR =>      undefined method `body' for #<Array:0x61054b8>


& when
<%=calendar(:year => @year, :month => @month ) do |d|
@todos.find_all_by_due(d)
end%>

ERROR =>      undefined method `map' for #<Todo:0x6381854>

whats the best way to show events on cells ?
Any help will be highly appreciated.

regards
Sanjay
This topic is locked and can not be replied to.