Displaying 1 result from an estimated 1 matches for "comp_date".
Did you mean:
comp_data
2006 May 22
13
How is this possible?
When run from the console, the following code works, when run through
the WEBrick server I get a "You have a nil object where you didn''t
expect it!"
class Competition < ActiveRecord::Base
has_many :comp_dates, :order=>:position
def initial_date
comp_dates.first
end
def display_dates
i_d = initial_date
if i_d.nil?
return "unknown"
else
return i_d.month
end
end
i_d should never be nil, in the first place; but how on earth does the
i_d.month calls get r...