Lighthouse has a new layout. Prefer the old one? Return to the old layout, and switch back any time from the link at the top of each page.

This project is archived and is in readonly mode.

mattr_accessor :config for module raises error (actionpack) after server restart

#6754

mattr_accessor :config for module raises error (actionpack) after server restart.
Putting for example the following in config/initializers/break_it.rb

module BreakIt
  mattr_accessor :config
end
ApplicationController.send(:include, BreakIt)

raises an error the first time a pare is requested after the servers starts (confirmed for webrick and thin):
.... undefined method allow_forgery_protection' for nil:NilClass .... actionpack (3.0.7) lib/action_controller/metal/request_forgery_protection.rb:123:inprotect_against_forgery?'

A similar error, not reproduced here was because:
actionpack (3.0.7) lib/abstract_controller/rendering.rb:131 => protected_instance_variables was nil instead of an array.

I renamed :config to something else to fix it. So low priority, but good to mention I think.

Reported by bterkuile · April 28th, 2011 @ 10:33 AM

State: new
Milestone: none
Assigned to: nobody
Importance: none

Activity

No comments yet.