-
Notifications
You must be signed in to change notification settings - Fork 650
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Visualization backup service #14764
Visualization backup service #14764
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Love the refactor! 😍
You forgot to add the new test file in Makefile, and I added some suggestions also.
You still have to add the new test in Makefile 🙂 And one more thing I forgot to mention: instead of defining the service as a module, I'd do it as a regular class, as we do here for example: https://github.com/CartoDB/cartodb/blob/master/app/services/carto/overviews_service.rb Modules are useful to provide some extra functionality to other classes, but in this case, I think a class fits better. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Couple of small comments. Nice extraction to a service!
Done! About converting the service into a class, it could be a class with 2 static methods but I think it would add more bureaucracy and really, the service doesn't need to be an instance (it is even better), it doesn't have properties in common, ... Said that as you know I have an important lack of RoR and for example, in |
I agree that here we don't need to create an instance and the methods could be static, so the class is not so useful, but I don't know why there will be more bureaucracy. In fact, we could remove some includes... Anyway, it's just an opinion, both ways are valid. Regarding |
retest this please |
Objectives:
bundle exec rake cartodb:vizs:restore_visualization['XXXXX']