vijaymallela88 / loan_management_system

0 stars 0 forks source link

Refactoring #1

Open jinifrancis opened 3 years ago

jinifrancis commented 3 years ago

The LoansController is pretty long now. What would be a good way to refactor it by following the Rails MVC design patterns?

vijaymallela88 commented 3 years ago

Thank you for your feedback. To reduce the code we can write the functions (methods) related code in models and call it from controllers.

On Wed, 13 Jan, 2021, 3:43 PM Jini Francis, notifications@github.com wrote:

The LoansController is pretty long now. What would be a good way to refactor it by following the Rails MVC design patterns?

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/vijaymallela88/loan_management_system/issues/1, or unsubscribe https://github.com/notifications/unsubscribe-auth/AR4Y7EK7BJAWRV6K4OYTPXTSZVW5JANCNFSM4WAR4NXA .

jerryjohnjacob commented 3 years ago

@vijaymallela88 A long model method is not a great substitute for a long controller method. Granted, the location of the code is better now, but it's still not the prettiest solution. Can you make changes to improve the overall readability of the code?

vijaymallela88 commented 3 years ago

Yes, I can.

On Fri, 22 Jan, 2021, 12:16 pm Jerry John Jacob, notifications@github.com wrote:

@vijaymallela88 https://github.com/vijaymallela88 A long model method is not a great substitute for a long controller method. Granted, the location of the code is better now, but it's still not the prettiest solution. Can you make changes to improve the overall readability of the code?

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/vijaymallela88/loan_management_system/issues/1#issuecomment-765175564, or unsubscribe https://github.com/notifications/unsubscribe-auth/AR4Y7EJZPJRPR25XEXNX663S3ENNJANCNFSM4WAR4NXA .

vijaymallela88 commented 3 years ago

Hi Sir,

I have followed the MVC design patterns and implemented the business logics in services. You can find the updated code in below attached link.

Git hub: https://github.com/vijaymallela88/loan_management_system/tree/master Heroku : https://loanmanagementsystemapp.herokuapp.com/

Thanks & Regards Vijay.

On Fri, Jan 22, 2021 at 12:17 PM v jai vijaymallela88@gmail.com wrote:

Yes, I can.

On Fri, 22 Jan, 2021, 12:16 pm Jerry John Jacob, notifications@github.com wrote:

@vijaymallela88 https://github.com/vijaymallela88 A long model method is not a great substitute for a long controller method. Granted, the location of the code is better now, but it's still not the prettiest solution. Can you make changes to improve the overall readability of the code?

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/vijaymallela88/loan_management_system/issues/1#issuecomment-765175564, or unsubscribe https://github.com/notifications/unsubscribe-auth/AR4Y7EJZPJRPR25XEXNX663S3ENNJANCNFSM4WAR4NXA .