search for: day_id

Displaying 2 results from an estimated 2 matches for "day_id".

Did you mean: dai_id
2006 Jan 16
8
AJAX + Table.
Hello all. I am trying ot load table rows using AJAX based on a search. The following code results in: 1. Firefox renders correctly (Multiple rows inserted into page). 2. Opera renders the entire returned string in one <td> by the looks of it (Bunched up under first header, the <> tags arne''t visible) 3. IE6 does nothing....great ;) This is driving me nuts so any help
2006 Jan 12
0
Multi Row validation... or running queries within Validate function?
...n a validate function? I need to verify that the sum of several rows does not exceed a certain value eg: class Entry < ActiveRecord::Base belongs_to :day belongs_to :project def validate totalhours = hours samedayentries = self.find_by_day_id(day_id) samedayentries.each do |i| totalhours += i[:hours] unless (id == i[:id]) end errors.add_to_base( "You cannot enter more than 24 hours in a day.") if totalhours > 24 end end Or some better...