In my User auth scheme I have a userlevel. I’ve overloaded the User
class operators like this:
if item.class == “User”
self.userlevel > item.userlevel
self.userlevel > item
(other operators are overloaded in essentially the same way). As I
understand it, using the operator “>” inside the overloaded operator is
OK because User.userlevel.class == Fixnum.
in my “edit.rhtml” view, I have the following code:
<% if @local_user > @user &&
@local_user >= 7000 ||
@local_user == @user %>
<% end %>
this produces an exception:
“comparison of Fixnum with User failed” - are my overloaded operators
not being used, or am I doing something wrong?