Read more

Consul 0.3.0 has a shortcut to quickly create an action map for CRUD controllers

Henning Koch
July 04, 2012Software engineer at makandra GmbH

In moderately complex authorization scenarios you will often find yourself writing a map like this:

class NotesController < ApplicationController
  power :notes, :map => {
    [:edit, :update] => :updatable_notes
    [:new, :create] => :creatable_notes
    [:destroy] => :destroyable_notes
  }
end
Illustration web development

Do you need DevOps-experts?

Your development team has a full backlog? No time for infrastructure architecture? Our DevOps team is ready to support you!

  • We build reliable cloud solutions with Infrastructure as code
  • We are experts in security, Linux and databases
  • We support your dev team to perform
Read more Show archive.org snapshot

Because this pattern is so common, Consul now has a shortcut :crud to do the same:

class NotesController < ApplicationController
  power :crud => :notes
end
Posted by Henning Koch to makandra dev (2012-07-04 11:08)