Re: [Rails] Is there a way to use @today in a model ??

2010-04-18 Thread Rick DeNatale
On Sun, Apr 18, 2010 at 2:46 AM, Philip Hallstrom wrote: > > On Apr 17, 2010, at 10:30 PM, Bob Smith wrote: > >> I'm trying to get records from a has_many that are only from this >> year. >> >> has_many :visit, :conditions => "year = #...@today.year}", :dependent >> => :destroy >> >> This has trou

Re: [Rails] Is there a way to use @today in a model ??

2010-04-18 Thread Colin Law
On 18 April 2010 06:30, Bob Smith wrote: > I'm trying to get records from a has_many that are only from this > year. > >  has_many :visit, :conditions => "year = #...@today.year}", :dependent > => :destroy > > This has trouble. it thinks @today is null.. Any other ideas? What is @today? Colin -

Re: [Rails] Is there a way to use @today in a model ??

2010-04-17 Thread Philip Hallstrom
On Apr 17, 2010, at 10:30 PM, Bob Smith wrote: I'm trying to get records from a has_many that are only from this year. has_many :visit, :conditions => "year = #...@today.year}", :dependent => :destroy This has trouble. it thinks @today is null.. Any other ideas? Don't you want :visits (wit

[Rails] Is there a way to use @today in a model ??

2010-04-17 Thread Bob Smith
I'm trying to get records from a has_many that are only from this year. has_many :visit, :conditions => "year = #...@today.year}", :dependent => :destroy This has trouble. it thinks @today is null.. Any other ideas? Bob -- You received this message because you are subscribed to the Google Gro