The 15 best gems for ruby on rails web applications

The 15 best gems for ruby on rails web applications

In this post I will share the technology stack that we use in DevInterface in order to create Ruby on Rails web applications.From my point of view, the gems that I’ll show later in this article represent the best options to develop in an Agile and DRY way and to achieve complex solutions in the shortest time possible.These gems are the “core” of each our Gemfile because they allow to solve ...

Read more

How to insert more Disqus comments box in a single page

Hello everyone! For those not familiar Disqus is a platform that allows you to easily insert a box for comments on any website and allows users to use the their Facebook or Twitter account (but not only) to authenticate. The limit of Disqus is that it associates any thread of comments to a unique url. Consequently, it will expect that in every page there is only a comment box. In most cases this limit is acceptable, but for some app...

Read more
Ruby on Rails and jQuery: multiselect with checkbox

Ruby on Rails and jQuery: multiselect with checkbox

Today I want to present a very convenient jQuery plugin I’ve used to create a combo box with checkboxes for a multi-selection field.Suppose we have a form of insertion / modification of user data, and that the user can have multiple functions. We start with rendering the form with a multi-selection field, where you can select more functions with the combination “<ctrl> + click “.1234567891011...

Read more

How-to send email with a Google account form Ruby On Rails

I have seen many articles in the web that explain how to send an email with a Google account from a Ruby On Rails application. However, I believe there are several faulty or incomplete examples around. That’s why I decided to share a working solution that I used in various projects.The main problem with Gmail (or with an address linked to Google Apps) is that prompts for an SSL connection. As often happens...

Read more

Rails Best Practices 6: Filters and helpers file

With the today’s post I shall conclude my series on Ruby On Rails Best Practices . This is not because the required topics are completed, but rather because after the release of Rails 3.0, some constructs have been changed and should be reviewed. Probably in future we will return to talk about best practices, but starting from the new features introduced in the current Rails version. But now I will describe two techniques that are valid and which...

Read more

Rails Best Practices 5: Optimize Migration

Migrations, in my opinion, are one of the best things in Rails since these allow the creation and populating the database using ruby code without having to worry about which type of db run below. That said, even writing the migration is better to follow some best practices. 1. DB Index The first practice I strongly recommend is to define indices for the external keys and for all those columns on w...

Read more