That returns: NoMethodError (undefined method `status_is_not' for 
#<Array:0x7f057b545448>):
status is an attribute in my database.
I have:
hobo_index Engineer.find(:all, :conditions => ["available < ?", 
Date.today]).status_is_not("left").apply_scopes(
                                    :search   => [params[:search],:name, 
:description, :note],
                                    :order_by => parse_sort_param(:name, 
:base, :available, :bu, :possible_extension),
                                    :base_is => params[:location],
                                    :bu_is => params[:bu]),
                                    :per_page => params[:records], 
                                    :paginate => true

On Wednesday, October 10, 2012 5:17:51 PM UTC+1, Bryan Larsen wrote:
>
> I think you can just insert the .find(:all, ...) before .status_is_not 
> in your big long finder. 
>
> Rails 2.3 has some limitations on that sort of thing, but I think 
> you're still fine. 
>
> Bryan 
>
>
> On Wed, Oct 10, 2012 at 12:12 PM, tomkins <[email protected] <javascript:>> 
> wrote: 
> > No errors now, but how do I apply it to the table? I have: self.this = 
> > Engineer.find(:all, :conditions => ["available < ?", Date.today]) 
> >     hobo_index Engineer.status_is_not("left").apply_scopes(:search   => 
> > [params[:search],:name, :description, :note], 
> >                                     :order_by => parse_sort_param(:name, 
> > :base, :available, :bu, :possible_extension), 
> >                                     :base_is => params[:location], 
> >                                     :bu_is => params[:bu]),:per_page => 
> > params[:records], :paginate => true 
> > 
> > On Wednesday, October 10, 2012 5:05:31 PM UTC+1, Bryan Larsen wrote: 
> >> 
> >> Yup, that's Rails 3 syntax. 
> >> 
> >> try Engineer.find(:all, :conditions => ["available_date < ?", 
> Date.today]) 
> >> 
> >> Bryan 
> >> 
> >> On Wed, Oct 10, 2012 at 12:00 PM, tomkins <[email protected]> wrote: 
> >> > My app is using rails 2.3.5, is this the problem? 
> >> > 
> >> > 
> >> > On Wednesday, October 10, 2012 4:52:16 PM UTC+1, tomkins wrote: 
> >> >> 
> >> >> Yes, my model is called Engineer 
> >> >> (class Engineer < ActiveRecord::Base) 
> >> >> 
> >> >> On Wednesday, October 10, 2012 4:47:32 PM UTC+1, Bryan Larsen wrote: 
> >> >>> 
> >> >>> 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 view this discussion on the web visit 
> >> > https://groups.google.com/d/msg/hobousers/-/a4AqZL-dcS4J. 
> >> > 
> >> > 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/-/xWzV4c4InpYJ. 
> > 
> > To post to this group, send email to [email protected]<javascript:>. 
>
> > To unsubscribe from this group, send email to 
> > [email protected] <javascript:>. 
> > 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/-/u7DITa761pAJ.
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.

Reply via email to