Hello !
Another newbie question.
I have the following view
VIEW:
<% @jobs.each do |job| %>
<%i = job.duration.time%>
<%@deadline = job.created_on + i.days%>
<%if Time.now < @deadline%>
<tr class="<%= cycle(''odd'',
''even'') %>">
<td><%=job.name%></td>
...
...
<%end%>
<%end%>
and
CONTROLLER:
def show
@jobs = Job.find(:all)
end
Everything works fine, but shouldn''t the stuff in the view be in the
controller?If so, plz give me some hints. I tried many options and non
of them work. Thx!
--
Posted via http://www.ruby-forum.com/.
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---