Verification: Module methods being called from controller

If I call module methods from a controller by “requiring my module into”
my controller (note that I am not doing a mixin), then it appears that I
have to define the module methods as class methods, e.g.


in order to access them via the module name.

Why is this necessary if a module isn’t a class?

It’s a little confusing because in the Pickaxe book, it looks like you
can just define module methods with

def xyz

and then access them via

Is Rails adding a restriction here or am I misunderstanding something


This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs