Topic: Role based access in rails

I need to implement role based access in the rails application we are building. The user and roles information are housed in a different db. authorized resources for a user are now available by invoking the service. I need suggestion on how to implement this is in the backend. The UI is javascript heavy application.

The Roles information for user is also available as a service. my idea was to invoke that and define the rules in the backend. if you guys can point me in some direction that will great.

Thanks Ramya