Note that there are some explanatory texts on larger screens.

plurals
  1. POCustom tab in Spree's admin panel
    primarykey
    data
    text
    <p>I can't bind my controller to the created admin's panel tab. What am I doing wrong?</p> <p>routes.rb</p> <pre><code>match '/admin/pimport', :to =&gt; 'spree/admin/pimport#index', :as =&gt; :pimport </code></pre> <p>overrides/pimport_tab.rb</p> <pre><code>Deface::Override.new( :name =&gt; "pimport_tab", :virtual_path =&gt; "spree/layouts/admin", :insert_bottom =&gt; "[data-hook='admin_tabs'], #admin_tabs[data-hook]", :text =&gt; '&lt;%= tab :pimport %&gt;' ) </code></pre> <p>controllers/spree/admin/pimport_controller.rb</p> <pre><code>module Spree module Admin class PimportController &lt; Spree::Admin::BaseController def index end end end end </code></pre> <p>and my views/spree/admin/pimport/index.html.erb is blank.</p> <hr> <p>At <code>http://localhost:3000/admin/pimport</code> I get this error:</p> <pre><code>NoMethodError in Spree/admin/pimport#index </code></pre> <p>It's showing </p> <pre><code>/Users/artemaminov/.rvm/gems/ruby-1.9.3-p194@rails327spree/gems/spree_core-1.1.3/app/views/spree/layouts/admin.html.erb </code></pre> <p>where line #35 raised:</p> <pre><code>undefined method `admin_pimport_path' for # ActionDispatch::Routing::RoutesProxy:0x007f88d5aacca0&gt; </code></pre> <p>Extracted source (around line #35):</p> <pre><code>&lt;div id="admin-menu" data-hook&gt; &lt;ul data-hook="admin_tabs"&gt; &lt;%= render :partial =&gt; 'spree/admin/shared/tabs' %&gt; &lt;%= tab(:promotions, :url =&gt; spree.admin_promotions_path) %&gt;&lt;%= tab :pimport %&gt; &lt;/ul&gt; &lt;br class="clear"&gt; &lt;/div&gt; </code></pre>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload