Software engineering and personal development

Tag: gems

Set up your user roles easily using Rolify gem

Img source: remino.net

User roles are definitions of what users can do while using your applications. For example, when you are developing a marketplace for renting cars, you may need at least two user roles: hosts, who provide their cars, and users, who rent cars. Both of these user types will have different functions that they have at their disposal. Rolify is a Ruby gem that allows you to easily add and manage user roles in your application.

It can be integrated with other Ruby gems that you may need like authentication gems (devise, Authlogic, Clearance) and authorization gems that don’t provide role classes (CanCanCan, authority, Pundit).

You can install it as any other Ruby gem, and fortunately, it comes with a great README walk-through of the setup procedure and usage that you can follow along.

As it is an open source project, you can view its source code, learn how it’s built and also become a contributor to it.

Click here to learn more about it.

Add like/upvote function for your model using Acts as Votable gem

Img source: instructables.com/

The ability to rapidly develop new features in your Rails applications with a lot of cool gems gives you the opportunity to be very productive. At the time of this writing, 14,821,263,017 Ruby gems have been downloaded, which represents a really large number of developers who have fortunately been able to use open source gems of other fellow developers in their applications. Acts as Votable is no exception.

Continue reading

© 2024 Fatos Morina

Theme by Anders NorenUp ↑