Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Option X baby
Ruby JavaScript CSS
Branch: master

Merge pull request #1 from AptsCom/implement-properties-map

Two migrations for users_apps_properties table
latest commit 33dab87242
Corey Ehmke authored
Failed to load latest commit information.
app It works dammit
bin It works dammit
config It works dammit
db Two migrations for users_apps_properties table
lib It works dammit
log It works dammit
public It works dammit
spec It works dammit
vendor/assets
.console_history It works dammit
.gitignore It works dammit
.rspec It works dammit
Gemfile It works dammit
Gemfile.lock It works dammit
README.md Update README.md
Rakefile It works dammit
config.ru It works dammit

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.