work around odd scoping bug in Rails