I don't think it is necessary creating any file in /lib since you want to run a process on just one model. Have your process method created in the model class : self.process_method() On Apr 21, 2015 3:35 PM, "Ben Amsalem" <[email protected]> wrote:
> Hi all, > I'm going to create a process that needs to execute a query (via one of my > model classes) and then create a file according to the result. > I think I'll locate this process class in my /lib folder, but it means > that the lib will have to "know" the relevant model method that executes > the query. > What do you think? Can you suggest a "clean" way to do it (when lib and > model stay disconnected)? > > -- > You received this message because you are subscribed to the Google Groups > "Ruby on Rails: Talk" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to [email protected]. > To post to this group, send email to [email protected]. > To view this discussion on the web visit > https://groups.google.com/d/msgid/rubyonrails-talk/d46cbaa9-8b2f-45b0-bd8d-0aa901e7c14b%40googlegroups.com > <https://groups.google.com/d/msgid/rubyonrails-talk/d46cbaa9-8b2f-45b0-bd8d-0aa901e7c14b%40googlegroups.com?utm_medium=email&utm_source=footer> > . > For more options, visit https://groups.google.com/d/optout. > -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/rubyonrails-talk/CAHewxcHY95SVLXf_L2Bnz0dQ6T9vU6rkCQsDF6%3DzoVfZCcximw%40mail.gmail.com. For more options, visit https://groups.google.com/d/optout.

