4 Rails gems and plugins you should know about

by Michiel on June 18, 2009

Here are four gems and Rails plugins I generally like to use to build Rails applications. Use them to support authentication, internationalization, haml/sass and model avatars in your new Rails app.

Blueprint CSS framework, haml and Sass

If you’re still using erb for your standard views you are old school. You should use Compass, the Rails gem that allows you to easily create stylesheets based on the Blueprint framework, using Haml and Sass in your styles and views.

Internationalization on models (I18n)

You can use the excellent Globalize2 by joshmh for making your Rails apps international. This plugins allows you to translate attributes on your models (dynamic translation). You can do this by creating the correct translation migrations and by adding this to your models. Use this plugin in combination with the standard Rails I18n API to fully translate your application labels and models.

class YourModel < ActiveRecord::Base
  translates :title, :text
end

Restful authentication with Authlogic

The authlogic gem by binarylogic allows you to create a flexible authentication system with accounts for your application. It supports a lot of options to configure and you can keep it as basic as possible. For example, you can create parent accounts (example: businesses and users of the application in that business), password reset functionality, OpenID and more. Check it out!

Account avatars and product previews

Want to add user profile pictures or product previews if you're running a web shop or other catalogue application? Use the Thoughtbott Paperclip plugin to generate avatar columns, handle the file uploads and scale to different sizes. If you like Paperclip, be sure to check out other Thoughtbott Rails marbles!

No related posts.

Leave a Comment

Previous post:

Next post: