Do you have an Engineer class derived from ActiveRecord::Base? I assumed that was the name of your class based on your example sql. If not, use your class name instead of Engineer.
Bryan On Wed, Oct 10, 2012 at 11:43 AM, tomkins <[email protected]> wrote: > For me that returns: NoMethodError (undefined method `where' > > > On Wednesday, October 10, 2012 4:36:44 PM UTC+1, Bryan Larsen wrote: >> >> def index >> self.this = Engineer.where(["available_date < ?", Date.today]) >> hobo_index >> end >> >> Bryan >> >> >> On Wed, Oct 10, 2012 at 11:26 AM, tomkins <[email protected]> wrote: >> > I would like to know how I can do a conditional query: (SELECT * FROM >> > engineers WHERE available_date < todaysDate) and then put the results >> > inside >> > a table plus. I currently can only get every engineer. >> > Any help is greatly appreciated, thanks. >> > >> > -- >> > You received this message because you are subscribed to the Google >> > Groups >> > "Hobo Users" group. >> > To view this discussion on the web visit >> > https://groups.google.com/d/msg/hobousers/-/lYhsGBQ8yjgJ. >> > To post to this group, send email to [email protected]. >> > To unsubscribe from this group, send email to >> > [email protected]. >> > For more options, visit this group at >> > http://groups.google.com/group/hobousers?hl=en. > > -- > You received this message because you are subscribed to the Google Groups > "Hobo Users" group. > To view this discussion on the web visit > https://groups.google.com/d/msg/hobousers/-/1-M_lgTzRtwJ. > > To post to this group, send email to [email protected]. > To unsubscribe from this group, send email to > [email protected]. > For more options, visit this group at > http://groups.google.com/group/hobousers?hl=en. -- You received this message because you are subscribed to the Google Groups "Hobo Users" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/hobousers?hl=en.
