Displaying 20 results from an estimated 1000 matches similar to: "Rails + postgres case insensitive searches."
2006 Mar 10
5
case insensitive search
I am having trouble with a simple gallery search.
I type in a segment of the address and i only
seem to be getting results if I use the correct case.
This is in my Gallery controller:
def search
@gallery = Gallery.find(:all, :include => :property,
:conditions => "address LIKE ''%#{@params[:keywords]}%''")
end
On a different note:
I am having
2006 Feb 23
11
Can''t use Gruff with Rails
Hello list,
I''m having a problem getting Gruff working with Rails on a Windows XP box.
I installed RMagick, then Gruff via the win32 gem, and it seemed to go
OK. From irb, I can do the following
- require ''rubygems'' ##### This returns ''false'', but seems to work OK
- require ''gruff'' ####### Ditto
- g = Gruff::Bar.new
etc., and I get
2007 Dec 29
6
Regarding the 1.1.3 security release
* Apologies for starting a new thread; I just subscribed.
Has anyone been able to make this exploit happen if requests are being
proxied to Mongrel through Apache? I''ve been trying variations on the
double-encoding thing and can''t trigger the exploit through Apache.
Hitting Mongrel directly does expose the problem.
I''ll still upgrade my servers, of course, but I
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 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 Jun 28
8
How to handle Gem repository failures?
Well, I''ve managed to screw myself but good, apparently.
I cleanup my "old" versions of actionmailer and actionpack, and now the
rails gem is unavailable and of course, I can''t start rails 1.1.2
without the latest actionpack and actionmailer.
None of the rails related gems appears to be currently available in the
repository for me to get the old versions back so
2006 Jun 28
15
Its here! RubyGems Release 0.9.0
Read about it here:
http://rubyforge.org/forum/forum.php?forum_id=7575
--
Posted via http://www.ruby-forum.com/.
2012 Oct 02
3
case insensitive inclusion validation
I want to add case_sensitive option to inclusion validation. This will
allow to do:
validates :numbers, :inclusion => { :in => %(One Two), :case_sensitive =>
false }
Does it make a sense?
Thanks.
--
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Core" group.
To view this discussion on the web visit
2006 Oct 23
10
text_field_with_auto_complete
Hi,all
I''ve used text_field_with_auto_complete for a while but still haven''t
figured out how to store the value that I selected from the suggested
options. any hints?
Thanks!
--
Posted via http://www.ruby-forum.com/.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Ruby on Rails:
2006 Mar 13
7
Wilcard search
Hello,
I''m writing a search function for my application, but I am unsure on how
to search for all results that contain my search string; here''s what
I''ve got:
def search
@products = Product.find(:all,
:conditions => "date_available < now()",
:conditions => [ "title ilike ?",
2008 Jul 08
3
undefined method `name' ...........
Hi Community....
I''m new in this game, so this might be a easy question, but I have
done my google, without result, so I will try this....
I''m learning ROR, and I''m using Patrick Lens ''Ruby on Rails'' book.
(This is written for ror 1.x - and I''m using NetBeans 6.1 - ror 2.x -
this might be the problem...)
But...
I have made this
2006 Feb 08
10
Writing activex controls and dlls in ruby.
Is it possible to write activex controls and windows DLLs in ruby? I
would like to have some of my logic be usable from VB (don''t ask why).
Thanks.
2006 Aug 14
3
case insensitive exclusion_of
I have the following validation code, however it will allow variations
in case. Like ''Admin'' and ''admiN'', etc
validates_exclusion_of :login, :in => %w( admin ),
:message => "is reserved for system accounts"
how can I make this validation case insensitive?
--
Posted via http://www.ruby-forum.com/.
2008 Jun 06
1
Making sorting case insensitive
Hello,
I''ve been trying to make sorting in ferret case insensitive without
any luck. I''ve been searching the mailing list, the docs and nothing.
Apparently setting the type option for the sort to string should do
it, but it doesn''t.
Does anyone know how to achieve this?
Thanks.
--
Efr?n D?az
http://www.efrendiaz.com
2010 Nov 02
2
Why can I do a case insensitive Validation but not Find?
Why can I do this....
validates_uniqueness_of "username", :case_sensitive=>false
.... but not this....
User.where "Xx", :case_sensitive=>false
?
--
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To post to this group, send email to
2006 Mar 09
16
Preloading child rows 2 levels deep?
I currently have 3 tables/models: 1) Clients, 2) Charges, and 3)
Court_Dates.
Clients 1..n Charges 1..n Court_Dates
I am trying to find all clients that have a court_date on a certain day:
something along the lines of (@client.charge.court_date.date ==
Date.today).
I have had success preloading child rows using the :include parameter,
but that only works with a parent and a child, or a
2005 Jun 29
5
Dual-ISP Masq
I know this is a FAQ and that it''s been discussed much before, I''m just
looking for a few key things.
I need to setup our gateway so that traffic FROM a range of IPs is sent
out, masqueraded, via a new cable connection.
I''m running 2.6.9.
Am I going to require any of the CONNMARK patches or other patches from
http://www.ssi.bg/~ja/#routes? I''m really not sure
2006 Jun 19
2
fuzzy search
This may be offtopic to Rails, but what are people doing to find records
based on fuzzy string matches? For example, if you wanted to find a
Person with name "David Heinemeier Hansson" but searched using the
string "Dave Hansson".
Currently I am find_by_sql that calls the PostgreSQL function
"levenshtein(string1, string2)" which returns results with a score
2004 Dec 08
9
Kernel/iptables question
As suggested here:
http://lists.shorewall.net/pipermail/shorewall-users/2004-October/015097.html
I''ve run:
adam@shrike:~$ /sbin/iptables -m policy --help
iptables v1.2.11
Usage: iptables -[AD] chain rule-specification [options]
iptables -[RI] chain rulenum rule-specification [options]
iptables -D chain rulenum [options]
--snip--
And:
adam@shrike:~$ sudo
2007 Jun 13
6
ActiveRecord query using association
Hello all,
I apologize if the answer to this question is going to be rudimentary,
but I am thus far stymied by the information I have found on the web.
This seems like it should be simple, but I haven''t really found an
example of how to do this yet.
I have a model called Account which has a belongs_to reference to
another model, User, as below:
class Account < ActiveRecord::Base