プロジェクトが Rails 2.2.2 を実行していて、それが定義されcontroller.helper
てhelper
いない場合、どのように解決できますか? (これは Facebooker2 gem http://github.com/mmangino/facebooker2用です)
詳細:
表示されるエラー:
=> Rails 2.2.2 application starting on http://0.0.0.0:3000
Exiting
/Library/
Ruby/
Gems/1.8/gems/facebooker2-0.0.5/lib/facebooker2/rails/controller.rb:8:
in `included': undefined method `helper' for Object:Class (NoMethodError)
コードは次のとおりです。エラー行は8行目です。
controller.helper Facebooker2::Rails::Helpers
次のコードで:
module Facebooker2
module Rails
module Controller
def self.included(controller)
controller.helper Facebooker2::Rails::Helpers
controller.helper_method :current_facebook_user
controller.helper_method :current_facebook_client
controller.helper_method :facebook_params
end