Posterous theme by Cory Watilo

How to assign permissions for custom controllers in locomotive cms

In my previous post I've shown how to render locomotive pages from you own controllers, but then I've realised that these custom controllers can be accessed only by the administrators of the site. So how to give mere mortal authors the permissions to edit that content?

Actually quite simply. Locomotive uses Cancan permission gem to handle who can do  what so all I needed to do is to use little bit of meta programming and did once again pointed me into right direction.

I did this:

And woula my Author level users can manage their albums without me. Hope that helps someone figuring locomotive cms out.