You should be putting your model logic in the model, not in the
controller.
on top of that, by putting it inside the controller like that you’ve
created a new module called LookupController::Enumerable rather than
extending Enumerable. If I were you I’d keep extensions to core
classes somewhere in lib.
On May 23, 12:59�am, Marnen Laibow-Koser [email protected] wrote:
… by putting it inside the controller like that you’ve
created a new module called LookupController::Enumerable rather than
extending Enumerable. If I were you I’d keep extensions to core
classes somewhere in lib.
Fred
Ah I see, of course. So I’ve moved it to ‘my_extensions.rb’ in lib/,
added “require ‘my_extensions’” in the controller and now it works fine.
Thanks!
This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.