I’m currently developing a plugin to do authentication and
authorisation. In the init.rb file of the plugin I have this code:-
$:.unshift File.expand_path(File.join(File.dirname(FILE), ‘lib’))
ActionController::Base.send :include, OpenAdvantage::Authorisation
and this is the skeleton of my plugin directory structure:-
the ‘vendor/plugins/lib/open_advantage/authorisation.rb’ file contains
currently with only a few methods in the Authorisation module.
However, when I change one of the functions in this module the
function is not mirrored in the output of the web browser. For
example if I deliberately make a mistake in the code it carrys on as
before when it should presumably raise a ‘Come on, FFS this is
nonsensical rubbish’ error. It continues to do this until the web
server (either lighttpd or webrick, I’ve tried both) are restarted.
Is there someway I can make the changes I’ve made in my plugin
immediately available to the application? I’ve tried putting various
require and include statements into the app/controllers/
application.rb file, but to no avail. The only way I can find for it
to pick up the changes every time is to pop the classes in the app/
controllers/application.rb file, and I’d really rather not develop
Any help would be gratefully received.