title: custom actions inside rails_admin gem
body: <p>I don't understand very good yet how it works <a href="https://github.com/sferik/rails_admin">rails_admin gem</a> for create a new action.</p>
  
  <p>I want create a action with name <strong>balance</strong> in rails_admin root.</p>
  
  <p>I have created a file with name <strong>rails_admin_balance.rb</strong> inside <strong>myapp/lib</strong> folder like:</p>
  
  <pre><code>require 'rails_admin/config/actions'
  require 'rails_admin/config/actions/base'
  
  module RailsAdminBalance
  end
  
  module RailsAdmin
    module Config
      module Actions
        class Balance &lt; RailsAdmin::Config::Actions::Base
         RailsAdmin::Config::Actions.register(self)
          register_instance_option :object_level do
            true
          end
          register_instance_option :link_icon do
           'icon-eye-open'
          end
          register_instance_option :root? do
            true
          end
        end
      end
    end
  end
  </code></pre>
  
  <p>I have created a new file on <strong>/views/rails_admin/main/balance.html.erb</strong></p>
  
  <p>inside my <code>rails_admin.rb</code> file I have</p>
  
  <pre><code>config.actions do
   dashboard                     # mandatory
   # collection actions 
   index                         # mandatory
   new
   export
   history_index
   bulk_delete
   # member actions
   show
   edit
   delete
   history_show
   show_in_app
   balance 
  end
  </code></pre>
  
  <p>When I try run rails server I get this error:</p>
  
  <p>Exiting</p>
  
  <pre><code>/home/ubuntu/Desktop/myapp/config/initializers/rails_admin.rb:33:in `block (2 levels) in &lt;top (required)&gt;': undefined method `balance' for RailsAdmin::Config::Actions:Module (NoMethodError)....
  </code></pre>
  
  <p>Where have I the error?</p>
  
  <p>What am I doing bad?</p>
  
  <p>Thank you very much!</p>