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 ?',
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
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
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
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