Archive for July, 2008

Controlling Whitespace with HAML

Thursday, July 31st, 2008

When displaying certain elements as inline, the whitespace between tags does matter in your layout.
When trying to display some LI tags as inline, I really needed to spit out the tags with no whitespace in between. Unfortunately HAMLs handy-dandy tag indenting was wrecking me. It was so bad, that I resorted to calling a helper [...]

Using Fixtures with Funky Table Names

Wednesday, July 16th, 2008

If you have an AR Model whose table name does not follow the convention, and you have needed to set it explicitly using set_table_name.

class ChiliDog < ActiveRecord::Base
set_table_name ‘dogs_made_of_chili’
end

Then your test fixtures file must be named the same name as the table, not the model…
dogs_made_of_chili.yml
In your rspec, you must use the table name to [...]