[Rails 3.2] class in lib does not override class in engine

13 views
Skip to first unread message

Erwin

unread,
Apr 18, 2013, 8:17:45 AM4/18/13
to rubyonra...@googlegroups.com
I am mounting the engine  'opro_oauth'  gem in my routes

mount_opro_oauth

I want to overwrite a method from the engine lib:     /lib/opro/auth_provider/devise.rb

module Opro
  module AuthProvider
    class Devise
...
      def find_user_for_auth(params)
      ...
      end
    end
  end
end

So, I added the modified devise.rb n my iapp , /lib/opro/auth_provider/devise.rb
and added     config.autoload_paths += ["#{config.root}/lib/opro/auth_provider"]   in my application.rb
I inserted a debigger statement to check if the method is reached but no way, the original method is always run..  what's wrong with my setup... ??

thanks for feedback


Reply all
Reply to author
Forward
0 new messages