charleschen / cantango-demo

Cantango Rails 3 demo app with devise integration

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Cantango Demo

Welcome to the Cantango Rails 3 Demo application!

This demo app aims to demonstrate how to use CanTango in a Rails 3 application.

Integrations

Integrations to be included are:

Engines

The following CanTango engines will be demonstrated, working together:

  • Permissions
  • Permits
  • User AC

Caching

The engines will be executed in the following cache configuration

  • Permissions – Cache
  • Permits – Cache and No Cache
  • User AC – Cache

The No Cache mode for Permits, will allow inclusion of permit rules that can NOT be cached due to dynamic conditional logic surrounding them. Here a very simplistic example to illustrate such a scenario:

def permit_rules
  if the_sky_is_falling?
   can :reach, Sky
  else
   cannot :reach, Sky
  end
end

About

Cantango Rails 3 demo app with devise integration