How to use services in Rails with Faat!
As I wrote earlier, I am developing a gem-generator for the separation of the base rails logic to resources, services and forms. Today I released a new version of my gem Faat!-v0.1.5. And added the module
services to separate the logic of your rails projects.
Now, you will see examples of working with service.
Ok, we just generated new
Also we need to have
As you can see, all the logic related to subscription and payment, now separated and moved to a separate service. So the code organization looks much better. We have completely separated the business logic and the controller logic.
It’s all to do not necessary, but it all looks better after this refactoring your code well organized. And it gives the opportunity for other developers to understand better your code.
Of course, you can do everything yourself, without using any additional gems, or something like that. But
Faat! gives you the opportunity to quickly generate you the necessary files and immediately begin to write the logic in the services or resources.
Faat! on github! or share this post in Twitter, Facebook!