Skip to content

Instantly share code, notes, and snippets.

@documentcloud
Created January 12, 2010 17:17
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 documentcloud/275379 to your computer and use it in GitHub Desktop.
Save documentcloud/275379 to your computer and use it in GitHub Desktop.
<script type="text/javascript">
window.RAILS_ENV = '<%= RAILS_ENV %>';
window.SERVER_ROOT = '<%= DC_CONFIG["server_root"] %>';
<% if @current_account %>
dc.app.organization = <%= @current_organization.to_json %>;
dc.app.accountId = <%= @current_account.id %>;
Accounts.add(new dc.model.Account(<%= @current_account.to_json %>));
Labels.populate(<%= @current_account.labels.alphabetical.to_json %>);
Bookmarks.populate(<%= @current_account.bookmarks.alphabetical.to_json %>);
SavedSearches.populate(<%= @current_account.saved_searches.alphabetical.to_json %>);
ProcessingJobs.populate(<%= @current_account.processing_jobs.to_json %>);
<% end %>
</script>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment