Skip to content

Instantly share code, notes, and snippets.

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"]}}
= 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"}
%th Assignments
%tbody{"data-bind" => "foreach: roles"}
%td{"data-bind" => "text: name"}
%td{"data-bind" => "text: app.scope"}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment