The right place for this inside a rails app?


I am developing a rails app about national constitutions and wrote a controller action that takes an xml file and creates articles from it in the db. I feel a controller to be the totally wrong place for such a functionality but for now during development it is convenient because of the implicit db access.

Where would be the right place inside a rails app for such functionality?

Or is there something like a “hidden controller” that can only be accessed by commandline?

Thanks in advance.

or model.

Thanks for your answer, Rishard.

Didn’t know about Services at all.

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