Rails 2.0では@headersはheaders
Controllerの下記の行でエラーになってしまう。
@headers['Content-Type'] = 'text/javascript; charset=utf-8'
Rails 2.0から@headersがheadersに変わったらしい。
@headersだと下記のようなエラーになってしまう。
NoMethodError (You have a nil object when you didn't expect it! You might have expected an instance of ActiveRecord::Base. The error occurred while evaluating nil.[]=): /app/controllers/top_controller.rb:149:in `mm_json'
http://www.rubyonrails.org/deprecation
↑ここに書いてある。
@params, @session, @flash, @request, @cookies, @headers, @response Use the params, session, flash, etc methods instead of working with the instance variables directly.