views:

7

answers:

1

I am trying to use the Savage Beast 2 plugin in my project. This plugin requires the use of Engines plugin. My project is on Rails 2.0.2.

There are some methods in

/main_app/vendor/plugins/savage_beast/lib/authentication_system.rb 

that I mean to override in

/main_app/app/controllers/application.rb

The views within the plugin (even if overridden by creating similar views in the main app) do NOT see the overridden methods within the application.rb and instead access the methods in

/main_app/vendor/plugins/savage_beast/lib/authentication_system.rb

The beginning of my application.rb looks thus:

class ApplicationController < ActionController::Base
  helper :all # include all helpers, all the time
  include SavageBeast::AuthenticationSystem

I also added the correct line to my /config/environment.rb -

require File.join(File.dirname(__FILE__), '../vendor/plugins/engines/boot')

after the require ... boot line.

I'm not sure what to do at this point. Any help will be appreciated.

A: 

Apparently it works if I override those methods in the ApplicationHelper instead!!! Why? I don't know! So instead of overriding those methods in application.rb I did so in application_helper.rb

And now it's working fine! I had to include my own authentication module within teh application_helper.rb to support the methods I was overriding though.

Arvind SG