Hi, I’m kinda new to ruby so there are some things which I’m not sure
which is the best approach.
Right now I’m needing a factorial function, and it doesn’t exists in
Fixnum class. So I thought about monkey patching this class and adding
the factorial method there.
The problem is that I read that monkey patching isn’t a very recommended
thing to do.
Does monkey patching in this case makes sense? Which would be a better
approach than that. And I’m using rails 4, so where should the monkey
patching code go?
Thanks