nathaniel bibler
Random thoughts, links, and code by
Nathaniel Bibler
You have found null^2. Oh yeah!
Steelhead Brewery Sampler
Named Scopes with PostgreSQL
When using chained named scopes that modify the :select finder option, the PostgreSQL adapter appears to give SELECT query preference to the first scope defined:
named_scope :foo, {:select => "foo.*"}
named_scope :bar, {:select => "bar.*"}
Tester.bar.foo.all #=> SELECT bar.* FROM tester...
While it seems somewhat straightforward in this example, when chaining multiple scopes, it is somewhat counter-intuitive that the first takes precedence.
Pushing to a different git remote branch
If you have the need to push a local git branch to a differently named remote branch, try this:
git push origin master:refs/heads/experimentalWhere “origin” is the remote name, “master” is your local branch name, and “experimental” is the remote branch to push into.
Ignoring database.yml
When database.yml is already in the repository, but you must have a modified local copy:
git update-index --assume-unchanged config/database.yml
Snow Hill Bridge
Google Friend Connect can’t handle my awesome.
Mail can’t verify the identity of “imap.gmail.com”.