Rails: How to redefine a Class

127 Views Asked by At

I am trying to use Spring in my rails project but I have my own class called Spring that inherits from another class of mine called Feature.

In my code I call .superclass on a variable that is set to Spring sometimes. It fails because the variable is set to the other Spring class. How can I set it to class I defined?

1

There are 1 best solutions below

0
Dima On BEST ANSWER

i would suggest use modules. create your class inside a module and call it MyModule::Spring to avoid conflicts