uninitialized constant RubyCAS::GatewayFilter
Closed this issue · 3 comments
When trying to use the code
before_filter RubyCAS::GatewayFilter
I get the following error:
uninitialized constant RubyCAS::GatewayFilter
I think is because the GatewayFilter is incorrectly nested.
I believe that the Filter class isn't closed (ended) until after the GatewayFilter is defined. i.e. the GatewayFilter is an inner class of Filter.
A better way of me showing this is to look at the code at the bottom of the rubycas-client-rails.rb file:
class GatewayFilter < Filter #(start the GatewayFilter class)
def self.use_gatewaying? #(start the use_gatewaying? method)
return true unless @@config[:use_gatewaying] == false
end #(end the use_gatewaying? method)
end #(end GatewayFilter class)
end #(end Filter class)
end #(end the module RubyCAS)
The code that looks like it closing the Filter class, is actually closing the "class << self" code within Filter.
I should add that I modified my local copy of this gem based on what I mentioned above, and it fixed the problem for me.
same problem here. solution in pull request #5
pull request 5 is in