Adding new code to Rails controllers can bring a couple of problems with it. Sometimes
controller actions get really big, and they tend to do a lot of things. Another common
problem is an increase in data over time, which can lead to slow page loading
time. Adding new code to controller actions can also
sometimes block the rendering of some actions if it fails, breaking user
experience and user hapiness.
Here at Semaphore, we came across these types of problems a couple of times. We usually
resolved them by splitting controller actions into smaller actions, and
After some time, we saw that this can be extracted to render_async,
a gem that speeds up Rails pages for you - it loads content to your HTML asynchrounously by making an AJAX call to
your Rails server.