Skip to content

Instantly share code, notes, and snippets.

@BrianTheCoder
Created January 21, 2015 01:15
Show Gist options
  • Select an option

  • Save BrianTheCoder/09c8678239c0a114241f to your computer and use it in GitHub Desktop.

Select an option

Save BrianTheCoder/09c8678239c0a114241f to your computer and use it in GitHub Desktop.

Revisions

  1. BrianTheCoder created this gist Jan 21, 2015.
    7 changes: 7 additions & 0 deletions admin_taxonomies_edit.rb
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,7 @@
    Deface::Override.new({
    virtual_path: "spree/admin/taxonomies/edit",
    name: "admin_taxonomies_edit",
    replace: 'script',
    partial: "spree/admin/taxonomies/taxon_tree_fix",
    disabled: false
    })
    5 changes: 5 additions & 0 deletions taxon_tree_fix.html.erb
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,5 @@
    <script>
    Spree.routes.taxonomy_taxons_path = "<%= spree.api_taxonomy_taxons_path(@taxonomy).html_safe %>";
    Spree.routes.admin_taxonomy_taxons_path = "<%= spree.admin_taxonomy_taxons_path(@taxonomy).html_safe %>";
    Spree.routes.jstree_theme_path = "<%= stylesheet_path("jquery.jstree/themes/apple/style.css").html_safe %>";
    </script>