Displaying 1 result from an estimated 1 matches for "display_html".
2006 Feb 16
1
Where to put the code? Helper or Model?
I have a class that generates an HTML calendar. It''s pretty simple,
with three methods of any significance: initialize(start,end),
add_event(event) and display_html
Basically, the way it works is this:
@events = Events.find #events in Feb 06
@cal = Calendar.new(''02/06'')
@events.each {|event| cal.add_event(event)}
Then in my view:
<%= @cal.display_html %>
Currently, I have a model called Calendar, but I''m wondering if I'...