2

I have a method "random_password" that I'd like to be able to access from multiple models in my rails 3 project. I'm just wondering what the convention is for where to store it & how to provide access to it. Any help appreciated.

PlankTon
  • 12,443
  • 16
  • 84
  • 153

1 Answers1

10

You would need a module. This is shared and can be used by multiple models. They are typically placed in /lib.

Spyros
  • 46,820
  • 25
  • 86
  • 129