B
Bob Aman
Ok, so, I have a method that I need to use in several models and two
controllers. I don't want to duplicate code, and initially, rail's
concept of a helper seemed like a good fit, but it looks like maybe it
only works with controllers, so maybe not. I'm a pretty much a nuby,
but I think maybe I want to do a mixin? If so, where would the module
with my method go within the rails application folder structure? And
how do I do a mixin?
controllers. I don't want to duplicate code, and initially, rail's
concept of a helper seemed like a good fit, but it looks like maybe it
only works with controllers, so maybe not. I'm a pretty much a nuby,
but I think maybe I want to do a mixin? If so, where would the module
with my method go within the rails application folder structure? And
how do I do a mixin?