Skip to content

Instantly share code, notes, and snippets.

@danielwestendorf
Created December 17, 2014 14:54
Show Gist options
  • Select an option

  • Save danielwestendorf/80ed1846968a417e4210 to your computer and use it in GitHub Desktop.

Select an option

Save danielwestendorf/80ed1846968a417e4210 to your computer and use it in GitHub Desktop.
class Admin < ActiveRecord::Base
include SimonSays::Roleable
has_roles :design, :support, :moderator, as: :access
end
Admin.new.access
# => []
Admin.new(access: :support).access
# => [:support]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment