Render view depending on state

Tarscher
2008-01-24T15:42:12Z

Hi all,

I have a list of events and when clicked an event you get detailed
info of the event. The detailed info actually depends on whether the
event has already occured or not. So if the event still has to happen
different content has to be rendered.

Is there a rails way on dealing with this or do I just use (in event/
show.html.erb):

if @event.starttime < Time.now
	#render event way 1
else
	#render event way 2
end

Thanks in advance
Stijn
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Ruby on Rails: Talk" group.
To post to this group, send email to
rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
To unsubscribe from this group, send email to
rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
For more options, visit this group at
http://groups.google.com/group/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---