A couple of these tricks I wasnt aware of like the find_each. Thanks for the write up 😉
With the fast pace of today’s agile development industries, we know how important it is to complete a project on time. We also recognize the importance of other factors such as flexibility and readability & most important performance of the application.
Many times even experienced developers do not consider above points, which wont impact during initial stages of application, but will raise problems when the data in application grows exponentially and enhancement is to be done for existing application.
Below are some best practices in Ruby on Rails, which should be considered at time of development in Rails framework.
* Use Eager Loading (Prevent N + 1 queries)
Most of the time new Rails developer not use eager loading of object in Rails.
Eager Loading is highly recommended at the time of development in Rails.
It mainly resolved the common issues like N + 1 queries.
We can detect the N…
View original post 1,165 more words