Created
September 28, 2011 05:02
-
-
Save jonpaul/1247029 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var staffs = new Array(); | |
var staff_to_services = new Array(); | |
var arr = new Array(); | |
staffs.push( new Array(null, 'Choose a staff member', null) ); | |
staffs.push( new Array(0, 'Any', 0) ); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!-- make the staffs select --> | |
<!-- @staff_members gets populated by this controller method --> | |
<% @staff_members.each do |staff| %> | |
<% staff.services.each do |service| %> | |
staffs.push(new Array('<%= service.id %>', '<%= staff.first %>', '<%= staff.id %>')) | |
arr.push('<%= service.id %>'); | |
<% end %> | |
staff_to_services['<%= staff.id %>'] = arr; | |
<% end %> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment