In our Ruby kitchen we cook web applications. What makes our apps savory is the Ruby gems: useful libraries that offer diverse solutions for common problems in web application development. We’ve selected 46 useful gems that we regularly use and would like to recommend to you!
Here at RubyGarage we work closely with Ruby and Ruby on Rails technologies. If we imagine our workflow as a kitchen where we “cook” applications, we might say that our developers are chefs, Ruby is our cookbook, and Ruby on Rails is our partially-prepared food: it’s half cooked, so we don’t need to do everything from scratch. Finally, we “season” our apps with gems – Ruby libraries with specific functionalities. Gems allow us to extend and customize our apps.
For this article, we’ve selected the top Ruby gems we regularly use in our projects – and recommend. Enjoy!
Active RecordActive Record is the default ORM for Ruby on Rails. Though it offers rich functionality, some projects require custom solutions or additional features. We’ve picked out a few gems that extend Active Record’s functionality making it more powerful, flexible, and versatile.
Pagination – For pagination, try a gem with the enigmatic name Kaminari, Japanese for “thunder.” Kaminari is a flexible out-of-the-box paginator (no configuration required) that uses scopes to handle ActiveRecord queries.
Categorization – To implement better classification and structuring of data on a blog, a news website, or a social network, you might want to add tags. The gem ActsAsTaggableOn allows you to tag objects (models and controllers) according to several attributes depending on your application’s content.
Clone – If you need to create a copy of an Active Record object and its associations, look at the gem deep_cloneable, which adds a method to objects to copy themselves. Deep_cloneable gives you an accurate copy with minimal effort.
Soft delete – Paranoia, which replaces acts_as_paranoid, implements a soft delete function. After you call destroy on an Active Record object, Paranoia doesn’t destroy those records in the database. Instead, this gem hides the object by scoping queries on a model. You need to use really_destroy to really destroy a Rails object.
Finite state machines – AASM, which replaces the theacts_as_state_machine plugin, works with any Ruby object including ActiveRecord. AASM adds finite state machines (sets of rules that dictate what an application or a device should do) to Ruby classes.
Versioning – The PaperTrail gem enables you to prevent frustrating situations when you can’t undo or redo changes to your models. With PaperTrail, you can version your models, add, undo, and redo behavior, restore data, work with model associations, and more.
Internationalization – When it comes to translating your application into foreign languages, Globalize, powered by I18n API, comes in handy. Globalize adds translations of your website’s content to ActiveRecord models, which is especially useful when you deal with translation of non-static database content.
Originally published here
How much does it cost to build your own human resource management software?
Ever wondered how much it costs to build a full-fledged piece of software for human resources management? In our new post we not only reveal the price for a complete HRIS solution, but also highlight and analyze popular existing HR solutions.Heroku or Amazon Web Services – Which is Best for Your Startup?
AWS and Heroku are advanced “X as a Service” products that let you rapidly deploy and manage your applications. Read our review to figure out which solution – Heroku or AWS – is right for your startup.Advantages of outsourcing a software product
When you want to create a new product from scratch, you can either gather your own team suitable for your needs or outsource the whole software development process to the professional outsourcing team.