Skip to content

Instantly share code, notes, and snippets.

@arekt
Created June 26, 2013 09:18
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save arekt/5865997 to your computer and use it in GitHub Desktop.
Save arekt/5865997 to your computer and use it in GitHub Desktop.
- 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