Fatos Morina

Software engineering and personal development

Month: March 2018

Moment is a lightweight JavaScript library that helps you work with dates

Img source: christosfellas.com

One of the best JavaScript libraries for working with dates is moment. It is really easy to install, use and has many functions that help you with parsing, validating, manipulating and formatting dates.

Continue reading

Find out which gems are consuming the most of your memory with Derailed

Img source: blog.honeybadger.io

Rails gives you a lot of great ways for rapid development, but there comes a time when your application is already mature and needs to be optimized, because it has become slow. The more gems you add to it, the slower it tends to get. Each gem you add in your project will increase the level of RAM this app consumes. Here is a gem called derailed that can help you learn about other gems, developed by Richard Schneeman.

Continue reading

How to write complex queries using Globalize gem in Rails applications

Img source: railscarma.com

Globalize is one of the most famous gems that is used for translating dynamic content in Rails application. It is really easy to use, and brings a lot of conveniences immediately after you add it in your application. I recently had to do a more complex query using the table added by Globalize generator, and I could not find that much information about ways of doing joins for this newly added table with the one that it corresponds and that translates its attributes. In this article, you can see a short example on how to do that.

Continue reading

© 2018 Fatos Morina

Theme by Anders NorenUp ↑