Skip to content


Subversion checkout URL

You can clone with
Download ZIP
Single click authorization (not for production)
Ruby CoffeeScript CSS JavaScript
Branch: master

Merge pull request #9 from bitdeli-chef/master

Add a Bitdeli Badge to README
latest commit fb6b8d8096
@FUT authored
Failed to load latest commit information.
app Tilde codes fix
config Possibility to log out
lib Version 0.3.3
spec Test app gemfile was updated
.gitignore JS was uglified
Gemfile Major refactoring Add a Bitdeli badge to README
Rakefile Assets moved vendor/ -> app/
iam.gemspec JS was uglified


I'm sure you have similar workflows and user stories across your application:

  1. Login as actor 1. Add any item. Prepare it for sale: price = $1.0, type of sale = [Existing in real world], Quantity = 2.
  2. Login as actor 2. Add the item to shopping cart.
  3. Login as actor 3. Add the item to shopping cart.
  4. Login as actor 1 and change the qauntity of the item to 1.
  5. Login as actor 2. Go to Shopping Cart. Make checkout.
  6. Login as actor 3. Go to Shopping Cart. Make checkout.
  7. Login as actor 1. Check the qautity value.

But you don't want to click log out, click log in, fill in email and password, click submit again and again, do you?


  1. Log in via user selection from list
  2. Log in via typing user id
  3. Log out


Log in via user selection from list:

  • press `
  • click user you want to log in as

Also you may log in using user_id (e.g. 42):

  • press `
  • type 42
  • press `


Add gem to your gemfile:

gem 'iam', '~> 0.3.3'

Generate configuration file:

rails g iam:initializer


You will get config/iam.yml that will suit you in 9 cases from 10:

# Amount of accounts to display for each role block
:accounts_for_each_role: 3

# Authorization provider will be used to perform log_in and log_out routines.
# You may easily extend current list of providers available. All you need
# is to implement MyProvider module and replace the setting with `my_provider` value
:authorization_provider: devise

  # This class will be used to instantiate accounts
  :class: User

  # These attributes will be shown in a row for each account
  - id
  - full_name

  # This class will be used to instantiate account roles
  :class: Role

  # These attributes will be shown in a row for each role header
  - name

All configuration params are well described and make the gem really flexible.

Also each developer can configure control keys (alt ctrl shift) to make up iam-menu show/hide combination. These configurations are saved into cookies and you may forget these settings after first customization.

Also the gem was totally disabled from usage in production environment. Thus you can sleep peaсefully ;)




Yury Kaliada

Bitdeli Badge

Something went wrong with that request. Please try again.