Displaying 18 results from an estimated 18 matches for "search_string".
2006 Feb 15
3
Like Query Across Multiple Tables
...ect
products.*
from products
inner join brands on products.brand_id = brands.id
where
products.name like ''%canon%''
or brands.name like ''%canon%''
Currently, I have a solution for only the products table. In the
product.rb I have:
def self.search(search_string)
find(:all,
:conditions => ["lower(products.name) like ?",
"%#{search_string.downcase}%"])
end
Which works fine, is there an easy way to add the search to include brands?
Thanks,
Dan
--
http://www.kingdomsolutions.com.au
2006 Jun 22
3
Partition results based on field
Hello all
I''m using Ferret for a site wide search where I have several kinds of
(similar) objects in a central index (using a "type" field containing
the class name). This works great, and I can search all objects with one
query.
What I''d like to do now is to limit the results so that there will be a
maximum of 10 (or 5 or whatever) results for each type.. I
2006 Apr 11
2
Finding items from two models - then merging them
I have a model, listings. Listings habtm categories and subcategories,
which are seperate models.
What I want to do is search categories for certain items, like so:
@categories = Category.find(:all, :conditions => ["name LIKE ?",
"#%{:search_string}%"
and subcategories for the same:
@subcategories = Subcategory.find(:all, :conditions => ["name LIKE ?",
"#%{:search_string}%"
Then I want to get @categories.listings, @subcategories.listings, merge
them into @listings, sort them by once of their fields, and displ...
2006 Feb 09
3
acts_as_taggable Produces Bad SQL - Find Fails
...agging side of
things, no problem at all. Running edge Rails and PostgreSQL 8.1.
I am then trying to find all my AR objects with a certain tag. The tag is:
lasvegas and I know that there are at least 3 records with that tag.
So, I''m doing this:
@lists = List.find_tagged_with :any => @search_string, :separator => ''+''
The problem is that the SQL generated looks like this:
SELECT lists.* FROM lists, tags, taggings WHERE lists.id =
taggings.taggable_id AND taggings.taggable_type = ''List'' AND taggings.tag_id
= tags.id AND tags.name IN (''anylasvega...
2017 Aug 30
3
Status of reverted Linux patch "tty: Fix ldisc crash on reopened tty", Linux 4.9 kernel frequent crashes
...to his Linux 4.9 LTS kernel the bug/problem goes away, so the patch (or similar fix) is still needed, at least for 4.9 LTS kernel.
Mikulas reported he's able to trigger the same crash on Linux 4.10:
https://www.spinics.net/lists/kernel/msg2440637.html
https://lists.gt.net/linux/kernel/2664604?search_string=ldisc%20reopened;#2664604
Michael Neuling reported he's able to trigger the bug on PowerPC:
https://lkml.org/lkml/2017/3/10/1582
So now the question is.. is anyone currently working on getting this patch fixed and applied upstream? I think one of the problems earlier was being able to reliab...
2006 Apr 15
8
Inheritance in Rails - I need some help
I''ve got a model, "category" and another model "subcategory." Each
subcategory belongs_to a category, and a category has_many
subcategories.
What I need to do is set it up so that I can search Category and
Subcategory with one .find call. So:
Category.find(:all, <etc)
will find categories and subcategories.
Now, I believe this can be done by making
2006 Jun 14
1
Partial matches with find_by
I have a form passing a parameter to a "show_search" action. Everything
goes fine, as long as i search for the exact title of the post. How do I
do a partial or "wild card" search? Code below:
def show_search
@posts = Post.find_all_by_title(params[:title])
end
--
Posted via http://www.ruby-forum.com/.
2006 Apr 15
0
active record and tsearch2, works?
I have a search form; I grab the value and use it in a fulltext query:
:conditions => ["idxfti @@ ''" + search_string + "''::tsquery and ...........]
Characters in search_string like "?", ":", bomb active record. I tried a
single tick and "\" to escape those, but active record still bombs (same
queries via psql work).
Suggestions?
-Tate
2006 May 01
12
pagination in acts_as_ferret
I''m just wondering where I would put the pagination for search results
when using "acts_as_ferret".
At the moment my search code is..
def search
@query = params[:query] || ''''
unless @query.blank?
@results = Tutorial.find_by_contents @query
end
end
Cheers
SchmakO
--
Posted via http://www.ruby-forum.com/.
2017 Sep 01
0
Status of reverted Linux patch "tty: Fix ldisc crash on reopened tty", Linux 4.9 kernel frequent crashes
...ill needed, at
> > > least for 4.9 LTS kernel.
> > >
> > >
> > > Mikulas reported he's able to trigger the same crash on Linux 4.10:
> > > https://www.spinics.net/lists/kernel/msg2440637.html
> > > https://lists.gt.net/linux/kernel/2664604?search_string=ldisc%20reopened;#26
> > > 64604
> > >
> > > Michael Neuling reported he's able to trigger the bug on PowerPC:
> > > https://lkml.org/lkml/2017/3/10/1582
> > >
> > >
> > > So now the question is.. is anyone currently working on g...
2017 Sep 02
0
Status of reverted Linux patch "tty: Fix ldisc crash on reopened tty", Linux 4.9 kernel frequent crashes
...el the bug/problem goes away, so the patch (or similar fix) is still needed, at least for 4.9 LTS kernel.
>
>
> Mikulas reported he's able to trigger the same crash on Linux 4.10:
> https://www.spinics.net/lists/kernel/msg2440637.html
> https://lists.gt.net/linux/kernel/2664604?search_string=ldisc%20reopened;#2664604
>
> Michael Neuling reported he's able to trigger the bug on PowerPC:
> https://lkml.org/lkml/2017/3/10/1582
>
>
> So now the question is.. is anyone currently working on getting this patch fixed and applied upstream? I think one of the problems ea...
2006 Feb 09
0
acts_as_taggable Generating Funky SQL
...agging side of
things, no problem at all. Running edge Rails and PostgreSQL 8.1.
I am then trying to find all my AR objects with a certain tag. The tag is:
lasvegas and I know that there are at least 3 records with that tag.
So, I''m doing this:
@lists = List.find_tagged_with :any => @search_string, :separator => ''+''
The problem is that the SQL generated looks like this:
SELECT lists.* FROM lists, tags, taggings WHERE lists.id =
taggings.taggable_id AND taggings.taggable_type = ''List'' AND taggings.tag_id
= tags.id AND tags.name IN (''anylasvega...
2011 Mar 09
0
Match and ChallengeResponseAuthentication
Hi,
I'd like to allow PAM authentication only from the local network, and
from the Internet only allow public key authentication.
A similar-enough problem has been discussed on this list previously:
http://www.gossamer-threads.com/lists/openssh/dev/47179?search_string=match%20challengeresponseauthentication;#47179
More specifically, I would like to allow PAM authentication from the
Internet only for users which I know use OPIE (that's because
pam_opieaccess isn't flexible enough for this).
That would be something like this:
ChallengeResponseAuthentica...
2011 Jan 16
1
Before and After Filters/Functions for Rails Routes
...url
search engine friendly developers use to_param function of model class. Then
they call to_s function to get the id of the elmenet. What if I want to
create url for not model but for string. Lets say I create link for post
controller''s search action. The only variable in the url is search_string.
Si how can i create seo link for this search page. I know how to create
links etc etc. but my problem is I want to call function on this string such
as to_param or something like that to make seo string, also in the
controller to perform a search I have to humanize this string again. So what...
2017 Sep 03
2
Status of reverted Linux patch "tty: Fix ldisc crash on reopened tty", Linux 4.9 kernel frequent crashes
...way, so the patch (or similar fix) is still needed, at least for 4.9 LTS kernel.
> >
> >
> > Mikulas reported he's able to trigger the same crash on Linux 4.10:
> > https://www.spinics.net/lists/kernel/msg2440637.html
> > https://lists.gt.net/linux/kernel/2664604?search_string=ldisc%20reopened;#2664604
> >
> > Michael Neuling reported he's able to trigger the bug on PowerPC:
> > https://lkml.org/lkml/2017/3/10/1582
> >
> >
> > So now the question is.. is anyone currently working on getting this patch fixed and applied upstream?...
2005 Dec 12
1
Search screens with dates
Tried googling and searching the lists for this. I''d like to do a
search on some dates and naturally enough use the date helpers. I
have a number of problems:
-- datetime_select wants an active record model
-- select_datetime does not take the options that datetime_select
take - specifically :order
that leaves me with something like
<label>Date/Time
2017 Aug 24
2
Major stability problems with xen 4.6.6
Just in case anyone else on this list is running into similar issues, I can
confirm that the patch appears to have resolved this.
I've opened https://bugs.centos.org/view.php?id=13713
It was so bad that having the system under load (with rpmbuild) and opening
another ssh window or two would almost always cause the oops.
Cheers,
Nathan
From: CentOS-virt
2005 Dec 19
17
Indexing so slow......
I am indexing over 10,000 rows of data, it is very slow when it is
indexing the 100,1000,10000 row, and now it is over 1 hour passed on
the row 10,000.
how to make it faster?
here is my code:
==================
doc = Document.new
doc << Field.new("id", t.id, Field::Store::YES,
Field::Index::UNTOKENIZED)
doc << Field.new("title", t.title,