Displaying 2 results from an estimated 2 matches for "time_record".
Did you mean:
time_records
2006 Jul 16
4
Calculations across multiple tables
...at - begun_at for each client.
Is it naive to imagine that AR''s calculations will span relations to provide
a grouped result?
The SQL I''m feeding to find_by_sql comes out something like this:
SELECT client_id, task_id, project_id, clients.client_name,
tasks.description,
time_records.start_at,
(SUM(TIME_TO_SEC(time_records.end_at) -
time_to_sec(time_records.start_at)) / 60) AS total_client_minutes,
(SUM(TIME_TO_SEC(time_records.end_at) -
time_to_sec(time_records.start_at)) / 3600) AS total_client_hours
FROM clients, tasks, time_records
WHERE tasks.cli...
2007 Apr 25
2
form_remote_for, reloaded
...RoR, I''m having a problem which I found described
in this forum and somewhere else - but with no solution. I know, that it
may be bad to mix table and form tags, but the first solution of an in
place editing within a table looked nice:
Version using form_for:
<tr>
<%form_for :time_record, :url => { :action => "add_time_record" } do
|f| %>
<% f.date_select(:day, :disabled => true, :order => [:day, :month])
%>
<td><%= f.date_select(:day, :order => [:day, :month]) %></td>
<td><%= f.collection_select(:user_id, @us...