Nil object for nested resource

I think you may need to rename your Attribute model. ActiveRecord
objects already have an instance variable named "attributes" which
holds the attributes for the given model instance. The Scorecard's
has_many :attributes collection and the pre-existing attributes hash
are probably colliding.

-John

Problem solved!

In the routes.rb file I had the following

map.resources :scorecards do |scorecard|
  scorecard.resources :perspectives
end

map.resources :perspectives do |perspective|
  perspective.resources: scores
end

when I should have had

map.resources :scorecards do |scorecard|
  scorecard.resources :perspectives do |perspective|
    perspective.resources :score
  end
end

Thanks,

Matthew