Skip to content

Instantly share code, notes, and snippets.

@jashkenas
Created March 25, 2011 21:40
Show Gist options
  • Save jashkenas/887693 to your computer and use it in GitHub Desktop.
Save jashkenas/887693 to your computer and use it in GitHub Desktop.
<script type="text/javascript">
window.RAILS_ENV = '<%= RAILS_ENV %>';
window.SERVER_ROOT = '<%= DC.server_root %>';
window.SERVER_ROOT_HTTP = '<%= DC.server_root(:ssl => false) %>';
<% if workspace %>
Organizations.refresh(<%= @organizations.to_json %>);
<% if @current_account %>
<%= render :partial => 'accounts/current_account.js', :type => :js %>
Accounts.refresh(<%= @accounts.to_json %>);
Projects.refresh(<%= @projects.to_json({:account => @current_account, :include_collaborators => true}) %>);
<% end %>
<% end %>
<% if @additional_js %>
<%= @additional_js %>
<% end %>
</script>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment