eduqg / LifeToRemind

:notebook_with_decorative_cover: Rails website to help students to create career plans.
https://lifetoremindhub.herokuapp.com/
BSD 3-Clause "New" or "Revised" License
11 stars 15 forks source link

Refactor Plans Controller #3

Closed eduqg closed 4 years ago

eduqg commented 4 years ago

Extract methods from plans controller. For exemple, there is many method related to pdf plan generation. Will be accepted multiple pull requests.

nathandonato commented 4 years ago

Hi, I'd like to take a look into this (part of it, at least). I'd like to extract the plan creation methods into a helper class, named something like PlansHashImporter, which would be called on line 317 of the controller.

If that's a suitable solution, where in the project would you like the importer? I was thinking maybe in a directory app/importers.

eduqg commented 4 years ago

Hello @nathandonato, at some point I have searched to use rake tasks to import and export methods of a plan.

But inside the app/helpers there are files to be used as helpers. Refactor some methods to plans_helper.rb, it might be the solution for what we want.

nathandonato commented 4 years ago

Hi @eduqg, I opened up a PR for the import changes. I put the new code in an app/importers directory because I felt importers are more specific than helpers, but I'd be happy to move them wherever you'd like. Just let me know in the PR review.