Better in-memory associations with :inverse_of
Today Rails gained a very interesting commit from h-lame. It’s the first major step towards making associations aware of their parent model while still in-memory. A few days ago I started this discussion which revealed to me that it had been a long time coming, just no one bothered.
Well, finally someone did. I [...]
Installing Sphinx with Postgres on Leopard
I didn’t find a quick short guide to installing sphinx on Leopard with PostgreSQL, hence here goes (this assumes you already installed PostgreSQL).
Compile dependencies
These two libs are required by sphinx according to this blog post.
~% mkdir src ~% cd src ~% curl -O http://ftp.gnu.org/gnu/libiconv/libiconv-1.13.tar.gz ~% tar xzf libiconv-1.13.tar.gz ~% cd libiconv-1.13 ~% ./configure –prefix=/usr/local [...]
Shmacros
I use shoulda constantly as it is my favorite testing framework. I figured the custom macros I write may prove useful to others, thus I released them as a plugin called shmacros. As of now it includes the following methods.
should_accept_nested_attributes_for should_act_as_taggable_on should_be should_callback should_delegate should_have_attached_file (removed in new revision) should_validate_associated
<p>It’s best to have <a href=”http://mocha.rubyforge.org”>Mocha</a> installed as some of the macros [...]