(this post is more suitable for engine-users btw - engine-developers
is more for patches to the Engines plugin… but anyway…
If you have something like this in your engine:
RAILS_ROOT/
vendor/
plugins/
my_engine/
app/
controllers/
main_controller.rb
(with the contents:)
class MainController < ApplicationController
def method1() puts “hello” end
def method2() puts “ruby” end
def method3() puts “rocketh” end
end
… if you just wanted to change the behaviour of, say,
MainController#method3, you should only need the following:
RAILS_ROOT/
app/
controllers/
main_controller.rb
(containing:)
class MainController < ApplicationController
def method3() puts “like, y’know, totally rules” end
end
Any methods defined in corresponding controllers of your main /app
directory will override those in the engine. Is this what you’ve done?
The latest release of the Engines plugin should solve this - is it
working for you?
james
---------- Forwarded message ----------
From: James A. [email protected]
Date: Jan 6, 2006 10:44 AM
Subject: Re: [Engine-developers] Stupid ruby controller question
To: [email protected]
This is a bug - expect a new release of the Engines plugin in a few
hours… Thanks!