
http_authentication plugin with Rails 2.1
July 17, 2008If you’re using the popular http_authentication plugin from DHH and getting a NoMethod error “protected method `render’ called for <SomeController>”, the problem is that in Rails 2.x controller.render is now protected. This was a pain to figure out, but it can be easily solved using an updated plugin from Matthew Rudy at http://github.com/matthewrudy/http_authentication/tree/master. Google wasn’t much help, so I’m hoping this post will save someone with this issue some time. Just run
script/plugin install git://github.com/matthewrudy/http_authentication.git –force
and you should be fine after that. The README in the plugin’s folder has further examples on use.





