Re: quick question re PostgreSQL and string case searching

2011-02-19 Thread Jesse House
not sure if this is what you are asking, but... I usually do something like this for queries that I want to be case insensitive # force both to upper :conditions = ['UPPER(email) = ?', params[:search][:email].upcase] # use postgres ILIKE which is case insensitive :conditions = ['email ILIKE ?',

Re: how to configure Mongoid for Heroku with the MongoHQ addon?

2011-02-19 Thread conway98
In your mongoid.yml you want something like this: defaults: defaults host: localhost development: : *defaults database: development test: : *defaults database: test # MONGOHQ_URL configured when mongoid add on added production: uri: %= ENV['MONGOHQ_URL'] % When you install the

Re: quick question re PostgreSQL and string case searching

2011-02-19 Thread Peter van Hardenberg
This approach seems reasonably portable to me. It's worth mentioning that if you're at the point where you're wondering whether there are subtle differences between PostgreSQL, MySQL and sqlite, you're at the point where you should just install PostgreSQL on your dev machine. It's really not hard

Action Caching... force it to use Varnish not Memcache

2011-02-19 Thread railsnerd
Hi everyone Is there a way to force Action Caching to cache to Varnish and not use Memcache? Yes I fully realise this might cause (?) the next request to hit Varnish and not my app, which defeats the purpose of Action Caching and I should use Page Caching... but I have my reasons :) If there

Re: Action Caching... force it to use Varnish not Memcache

2011-02-19 Thread Chris Hanks
Not sure what you mean by this. Varnish is an HTTP cache, it sits in front of your dyno and only caches the responses that it sends - you can't use it as a key-value store like memcached. When a request is handled by varnish and doesn't even hit your app, that IS page caching. If you could write