I'm use Rails 2.2.2. Rails manual said, the way to extend controller from plug-in is:
Plugin:
module Plug
def self.included(base)
base.extend ClassMethods
base.send :include, InstanceMethods
base.helper JumpLinksHelper
end
module InstanceMethods
def new_controller_metod
...
end
end
module ClassMethods
end
end
app/controller/name_controller.rb
class NameController < ApplicationController
include Plug
...
end
Question: is any way to extend controller from plug-in, without any modification of controller file, if we know controller name.