I'm developing a Rails application and want to create some classes that can be called from my controller. But, whenever I make changes to those external files, I always have to restart my server. I can make changes to the controller itself and basically any other file without issue.
Notice the following two screenshots. The thing that gets me is that even the extracted source preview shows the line has been removed, and yet it behaves as though the line was there (until I restart my server).
Before change:
After change:
This is my controller
class EvaluationObject
def self.raise_error
raise "this is an error".inspect
end
And this is the class method I'm calling.
def show
EvaluationObject.raise_error
end
I already checked out "Why does Rails not refresh classes on every request (despite configuration)?" and "Rails Server needs restart every time I make changes? why?" and none of the solutions worked for me. I tend to believe I'm missing something obvious. Any thoughts?
Edit: These .rb files are in the same directory as my controllers. I've also put them in the concerns directory.