views:

30

answers:

0

If a project is running Rails 2.2.2, and it uses controller.helper and the helper is not defined, then how can it be solved? (this is for the Facebooker2 gem http://github.com/mmangino/facebooker2)

details:

error shown:

=> 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)

The code is: error line is line 8:

        controller.helper Facebooker2::Rails::Helpers

in the following code:

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