Skip to content

Instantly share code, notes, and snippets.

@arekt
Created June 26, 2013 09:18
Embed
What would you like to do?
- roles = []
- roles << {"Can manage users" => {:scope =>["reza", "waitline"]}}
- roles << {"Can change settings" => {:scope =>["pssurvey"]}}
- roles << {"Can use" => {:scope =>["account"]}}
.container
.row
.span12
= ko_context system: {users: {"Arek" => roles, "田中" => roles }}, settings: [1,2,3] do
/ko foreach: window.s = new System(context.model.system).users
%h2{"data-bind" => "text:name"}
%table.table.table-striped.table-bordered
%thead
%tr
%th Assignments
%tbody{"data-bind" => "foreach: roles"}
%tr
%td{"data-bind" => "text: name"}
%td{"data-bind" => "text: app.scope"}
//ko
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment