similar to: case insensitive search

Displaying 20 results from an estimated 2000 matches similar to: "case insensitive search"

2006 Mar 13
2
error message for empty object
I want to have some sort of message to be shown when I have an empty object. For example when I click on a properties'' gallery and their are no photos, I want a simple "gallery is empty" I have managed to do this in the view by doing a crude code block: <% unless @object.empty? %> (show gallery) <% else %> gallery is empty <% end %> I am sure rails has a
2006 Apr 20
7
Rails + postgres case insensitive searches.
Hello all I am wondering how rails handles case sensitivity in databases. If I do a Person.find_all_by_name("tim") in mysql I would expect to get tim, TIm, and Tim. Do I only get tim in postgres? How do other people deal with this? Do you resort to find_by_sql for all your postgres queries to get case insensitive results?
2007 Jul 24
4
spec''ing helpers that use controller
Hi all, I''m in the process of creating rspecs for my helpers. One of the helpers in app/helpers/application_helper.rb looks like this: def page_name @page_name || "Define @page_name in #{controller.controller_name}::#{controller.action_name}" end The rspec is simply: it "should something" do page_name end
2006 Jul 25
2
Model relationship confusion ...
Hi all, I''m thinking this must be pretty straightforward, but I''m finding myself kind of going in circles in trying to model a simple "private messaging" app. I have two models: user and message User has many messages Message has a sender (User) has many recipients (Users) I''m at a bit of a loss as to how best define the relationships that occur in
2007 Jun 09
11
authentication, controller specs. I think I''m missing something simple ....
Hi all, I feel like I''m missing something really easy and I''m just not seeing it. I''m using the restful_authentication plugin and have a User model. Uesr has_many :things and Thing belongs_to :user. That''s it. I did a "script/generate rspec_scaffold thing" to generate all the necessary bits. The "rake db:migrate" to create the db. At
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 ?",
2006 Jul 14
5
Acts_As_Taggable Plugin multiple controllers.
I have Acts_As_Taggable Plugin working. I have a HR controller and a sales controller. I have a document in hr tagged whitepaper and a differnent document in sales tagged whitepaper when I am in hr I see the hr document tagged with whitepaper and not the sale document (what I want). but if I click on the tag whitepaper I return two documents, hr and sales. I just want to return the hr document
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
2013 Mar 05
4
searching model and has_one association
Howdy. I have these models: User, field "mundane_name" user has_one :instructor_profile (may or may not exist) instructor_profile, field "sca_name" belongs_to :user I would like to craft a search on these fields, which is effectively this, but in one go: matching_users = User.where("mundane_name ILIKE ?", "%#{target}%") matching_profiles =
2008 Oct 06
1
GETQUOTAROOT (part 2)
> > Upgraded to 1.1.2 from atrpms.net but I'm still > getting > > the same behavior. I am trying to look at the quota > > plugin source (e.g. quota-maildir.c), but I'm very > rusty > > in that aspect already. Thank you. > > This should help: > http://hg.dovecot.org/dovecot-1.1/rev/a80719eac45d Many thanks! Will get version 1.1.4. I supoose this
2002 Mar 29
1
help with lme function
Hi all, I have some difficulties with the lme function and so this is my problem. Supoose i have the following model y_(ijk)=beta_j + e_i + epsilon_(ijk) where beta_j are fixed effects, e_i is a random effect and epsilon_(ijk) is the error. If i want to estimate a such model, i execute >lme(y~vec.J , random~1 |vec .I ) where y is the vector of my data, vec.J is a factor object
2006 Feb 01
6
Little Ferret Problem
I''ve implemented Ferret, using the instructions here: http://wiki.rubyonrails.com/rails/pages/HowToIntegrateFerretWithRails I get no errors in the application at all... however, I always get 0 results. I built an index off of some data, it exists in the index/ directory, the form submits find... etc... Just 0 results... all the time :) I confirmed the data from my models is being put
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 +
2011 Sep 19
2
[LLVMdev] LLVM,metadata for namespaces
just off the cuff, have you actually created and used any names in the namespace. I don't know for sure, but it wouldn't surprise me if the namespace doesn't exist independently of any uses. ------------------------------ From: Irina Lipov Sent: 9/19/2011 3:16 AM To: llvmdev at cs.uiuc.edu Subject: [LLVMdev] LLVM,metadata for namespaces Hello, I am wring front end for compiler ,the
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 Aug 09
1
Improvement: SiteMapper - working ideas as a possible RoR''s routing replacement
Hello, I''ve done potencial replacement for RoR''s routing mechanism. It just works as an independent class so you can try bundled examples withou installing anything else. I didn''t integrated it into Rails (as a plugin?) because I don''t know if anyone would appreciate it etc. SiteMapper features: -------------------- 1. uses regexp mask to get variables from
2019 May 19
2
Race condition on parallel package's mcexit and rmChild
I've been hacking with parallel package for some time and built a parallel processing framework with it. However, although very rarely, I did notice "ignoring SIGPIPE signal" error every now and then. After a deep dig into the source code, I think I found something worth noticing. In short, wring to pipe in the C function mc_exit(SEXP sRes) may cause a SIGPIPE. Code from
2017 Jun 06
2
integrating 2 lists and a data frame in R
Dear all, please could you advise on the R code I could use in order to do the following operation : a. -- I have 2 lists of "genome coordinates" : a list is composed by numbers that represent genome coordinates; let's say list N : n1 n2 n3 n4 and a list M: m1 m2 m3 m4 m5 2 -- and a data frame C, where for some pairs of coordinates (n,m) from the lists above, we have a
2007 Mar 30
2
gallery issue...
Hi, i''m new of both webgen and ruby, so maybe this can be a dumb question, but i can''t recognize any solution by myself. I use webgen 0.4.1 (the newest webgen .deb package). I''m trying to make a test gallery, without succeeding in it. i done (ehm, copied) the yeah.gallery file in the root directory: 1 title: Example Gallery 2 imagesPerPage: 32 3 images:
2006 Jul 24
0
Errors with my generate
Hi there, I''m getting the following errors with my generate script. I haven''t changed anything, it just started happening one day. It also does this when i create a migration: penoir> ruby script/generate controller Gallery::Artist -p create app/controllers/gallery create app/helpers/gallery create app/views/gallery/artist create