Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Option X baby
branch: master

Fetching latest commit…

Cannot retrieve the latest commit at this time

Failed to load latest commit information.
app
bin
config
db
lib
log
public
spec
vendor/assets
.console_history
.gitignore
.rspec
Gemfile
Gemfile.lock
README.md
Rakefile
config.ru

README.md

Option X

Roles and Apps

In rails console:

user = User.create(:email => 'cehmke@apartments.com')
app = App.create(:description => 'Online Reporting')
Role.create(:user => user, :app => app, :description => 'admin')

user.roles.first.description
=> admin

user.roles.first.app
=> #<App id: 2, description: "Online Reporting", created_at: "2013-09-18 20:12:31", updated_at: "2013-09-18 20:12:31">

user.apps.first.description
=> "Online Reporting"

user.apps.first.role
=> #<Role id: 4, description: "admin", created_at: "2013-09-18 20:12:31", updated_at: "2013-09-18 20:12:31">

Specs

It works, dammit :)

rspec spec/
Something went wrong with that request. Please try again.