Rails 2.2 gotcha - inline subclasses

Courtenay : May 15th, 2009

Due to the way Rails' development mode works, you need to make sure you don't define subclasses in your "concern" files like this:

# status.rb
class Status
  include "status/filtering"
end

and then

# status/filtering.rb
class Status
  module CustomAssociationExtension
  end
end

Instead, you should have a file app/models/status/custom_association_extension.rb so that rails can easily find it.

Ticket: #1339 (note: not solved)

1 Response to “Rails 2.2 gotcha - inline subclasses”

  1. really-strange-avr-clock-script Says:

    Umm thought ide bring to yer attention that the wiki and alterd_beast are both broken

    (rake has no spec)

Sorry, comments are closed for this article.