Browsing the archives for the Ruby on Rails category

Instance variable not assigned in view

I just spent a few minutes in la-la-land trying to figure out when an instance variable assigned in the controller stopped showing up in the view, despite all evidence that it was getting set correctly in the controller. The answer was that there were several conditions that would case an update action to render :action […]

April 7, 2010 in Ruby on Rails, Uncategorized

Can Coding Standards Be Enforced Programmatically?

We’ll find out. Saw this today, can’t wait to give it a try: http://github.com/flyerhzm/rails_best_practices A program that checks your Rails code against the “best practices”.

January 7, 2010 in Ruby on Rails

Making YSlow Happy With Rails, Apache, Passenger

Over the past month I’ve been obsessed with speeding up a Rails app that I perceived to be slow (http://stopfamilyviolence.org). Requests would take half a second minimum and only 50 db queries if lucky. One I saw one at 183, I went on a mission. Most of the work was implementing fragment caching and chasing […]

November 15, 2009 in Ruby on Rails

Thinking Sphinx with Excerpt Highlighting

So you want to highlight search terms and excerpt relevant phrases in your search results, and you want it done using the same stemming rules that your search engine uses to gather results? This patch will do that for you.

February 26, 2009 in Ruby on Rails

Search Multiple Models at Once with Thinking Sphinx

You can search across multiple models and return a combined result set with Thinking Sphinx.

February 26, 2009 in Ruby on Rails

Thinking Sphinx with Paginating Find

Thinking Sphinx can work with paginating_find with a simple patch of the search method.

February 26, 2009 in Ruby on Rails