You're entirely responsible for the search.   All table-plus does is
provide it in params[:search] to your controller method.   The
examples generally pass params[:search] to the search automatic scope,
but you don't have to do that.

For example, you could do:

    begin
       self.this = Foo.find_by_date_published(Date.parse(params[:search]))
    rescue ArgumentError => e
       self.this = Foo.search(params[:search], title)
    end
    self.this = self.this.paginate(:page => params[:page)

Bryan



On Tue, Sep 4, 2012 at 7:51 AM, tomkins <[email protected]> wrote:
> I have noticed that the table plus search box always takes the value as a
> string, is there any way to search by the same type as the column in SQL, eg
> date?
> Thanks.

-- 
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.

Reply via email to