Displaying 20 results from an estimated 2000 matches similar to: "Making sense of all the search options"
2006 Jan 09
3
Pagination :conditions not working - MySQL v. PostgreSQL, Rails abstraction v. embedded SQL
Hi everyone,
I have this code:
@person_pages, @people = paginate :person, :per_page => 20,
:conditions => [ "username LIKE ? OR first_name LIKE ? OR
last_name LIKE ? OR preferred_name LIKE ?",
"%" + params[:q].downcase + "%",
"%" + params[:q].downcase + "%",
2006 Jan 31
6
Pagination - why is it this hard?
Hi everyone,
I''m at the end of my rope on this. I can''t get pagination to work
with anything but a standard find on a model. If I try to do a search
and customize the pagination, I get lots of different variations.
My thought was to have the list action do what it does, but to pass it
a list of search conditions from the search action. So, if search
determines that we need
2005 Dec 21
1
Active Search
Issue:
I am trying to get a good quality search capability across our site. I
ran across ActiveSearch
(http://julik.textdriven.com/svn/tools/rails_plugins/simple_search/)
which seems to be a better solution for us than SimpleSearch (and
SearchGenerator) as it is more than just word based. However, I am
unable to get the project built and being fairly new to Ruby / Rails I''m
a little
2006 Feb 15
10
STI Question
Hi everyone,
I have 3 types of people (for now):
Staff
Faculty
Students
To break them up into classes, but keep them in the same People table,
I''ve broken them up like so (code and ''ends'' snipped):
class Person < ActiveRecord::Base
class Employee < Person
class Staff < Employee
class Faculty < Employee
class Student < Employee
So, when I insert
2006 Jan 19
0
Help with nested HABTM relationship
Hi,
I am trying to perform a query with ActiveRecord that I want to put into
a Rails application later. For now I just wrote it within a plain old
Ruby script for easier testing.
I am working with an existing database so I had to map some foreign keys
myself. As you can see from the models below, the database has a
structure of
Prospectlists <=habtm=> Contacts <=habtm=> Accounts
2006 Mar 29
3
MySQL in dev, Postgres in prod - differences in "LIKE" query
Hi everyone,
I run MySQL in my dev environment, but Postgres in my production
environment (out of necessity). I''m having trouble finding a way to
write a query with a LIKE condition that is supported as case
insensitive in both databases.
Right now, I have this:
@query = "m" # for example
@people = Person.find(:all, :conditions => ["last_name LIKE ?", @query +
2006 Apr 28
1
Full-text Search Options Redux
Hey all,
I haven''t heard much on the list in a while re: ActiveSearch, Ferret,
Hyper Estraier, etc. in a while.
Has anyone successfully used ActiveSearch on tables with rows in the
order of hundreds of thousands, if not millions?
(in our case, each row containing anywhere from a paragraph of text to
many pages)
Here''s some background on our search efforts.
A. Hyper
2006 Feb 17
0
SearchGenerator: Results list duplication
Hello all,
I''ve installed the SearchGenerator from here
(http://wiki.rubyonrails.org/rails/pages/SearchGenerator) and have it up
and running perfectly when I only have one field in the make_searchable
list. When I add a second field to the make_searchable list I get some
strange behavior, my results list now displays each result twice.
Has anyone else encountered this issue and if
2006 Mar 30
2
acts_as_ordered plugin
Hey all,
I''ve just put together a little plugin to easily access the neighbours of a
given model in a particular order. Read on if interested.
Install:
script/plugin install
http://svn.viney.net.nz/things/rails/plugins/acts_as_ordered
Usage:
class Person < ActiveRecord::Base
acts_as_ordered :order => ''first_name''
end
Say you have people with first
2006 Jan 04
8
Trying to display data from two tables
Alrighty folks, I''m really trying here, and want to succeed with Ruby on
Rails.
I''m trying to display data that is linked from two tables using the
Active Record naming conventions, as described in Agile Web book.
The stripped-down basics;
Database
drop table if exists people;
CREATE TABLE `people` (
`id` int(6) NOT NULL auto_increment,
`lastname` varchar(30) NOT NULL,
2006 May 22
0
Need help with searchgenerator
Hi,
I installed rails searchgenerator. When i run ''ruby script/generate
search Search --inspect'' to check the models that are searchable, it
returns none. I''ve about 9 models in my application. Why is none of the
models searchable? I did work when i run ''ruby script/generate
search Search --inspect'' on the example from Agile book.
Thanks,
Adi.
--
2006 Jan 11
0
Partial View with SearchGenerator - HELP.
Has anyone here used the SearchGenerator? I''m having
trouble setting up the "Partial" view, the
documentation makes me think a Partial template is
included, but I don''t see one. I have the search index
and generic view file.
Anyone have the code that is in partial view? Or how
to set it up?
I''d like to have the description of an article come up, with a link
2006 Jan 30
0
SearchGenerator Question..
I''ll admit I''m fairly new with ruby on rails...but i''m plugging along
quite nicely (in my opinion of course).
I''m using instantrails (on win xp sp2), and took the example cookbook
and modified to to make it my very own!
I''ve successfully added the login generator, and that works quite
nicely (for my needs).
I''m now attempting to add in the
2006 May 05
3
exception_notification plugin not sending mails in development on localhost
Hi everyone,
So, I''ve got exception_notification working now, but not in
development mode on localhost. In my ApplicationController, I''ve
added:
local_addresses.clear
Shouldn''t that be enough?
Thank you!
Sean
2006 Mar 30
3
Model.find(:all) where Model.association has more then 0 items?
Hi everyone,
I have a Department model that has_many people. How do I go about
finding all departments with more than 0 people?
Department.find(:all, :conditions => Department.people.size > 0)
That, of course, doesn''t work, but it was as close as I could come.
Thanks!
Sean
2006 Mar 15
7
O''Reilly Rails Cookbook on Rough Cuts
Subject says it all. Anybody taken a look yet?
http://www.oreilly.com/catalog/railsckbk/?CMP=ILC-GG7423313304&ATT=railsckbk
After buying the Ruby Cookbook and the other Rails book, I''m pretty
gunshy about another Rough Cuts purchase.
Sean
2006 May 04
5
How to install Ferret to get the best performance
Hey all,
After dabbling with ActiveSearch, we''re coming back around to take
another look at Ferret.
ActiveSearch slowed to a crawl after indexing about 20k documents, each
20 lines each.
This time we may attempt to create multiple Ferret indexes (isolating
each organization''s data individually), since we eventually could have
upwards of 20k documents for some
2007 Dec 31
1
Yum breaks after updating to CentOS 4.6
Hi everyone,
Yum on one my CentOS systems has decided to stop functioning after an
upgrade to CentOS 4.6. It's complaining about errors with
Python-SQLite packages?
Any ideas anyone? Here is what happens.
[root at monk var]# yum search zaptel
Setting up repositories
Reading repository metadata in from local files
Traceback (most recent call last):
File "/usr/bin/yum", line 29,
2006 May 25
4
Using an external database behind a firewall
Hi everyone,
There''s a separate database I''m using to get mail group info for our
users (Sympa), and I''ve got Rails configured to pull data directly
from it via an entry in database.yml
The issue we''re having is that the database server in question is
behind an internal firewall that has idle timeouts set at 30 minutes.
If the connection isn''t used
2006 May 05
1
NameError when running exception_notification plugin?
Hi all,
I installed the exception_notification plugin via ''script/plugin
install'', and when configure it and try to run it, I get:
NameError
uninitialized constant ExceptionNotifiable
This error occured while loading the following files:
application.rb
exception_notifiable.rb
In my application.rb, I added this:
include ExceptionNotifiable
And in my development