title: Rails devise add management routing
body: <p>I am not to sure what the best way, but in a way i am kinda mixing up myself. What i am trying to do is a way for an admin to go into a user profile and modify items.</p>
  
  <p>Route</p>
  
  <pre><code>  devise_for :customers, :controllers =&gt; {:registrations =&gt; 'registrations'}
    resources :usermanagements
  </code></pre>
  
  <p>Controller</p>
  
  <pre><code>class RegistrationsController &lt; Devise::RegistrationsController
    def update
      # required for settings form to submit when password is left blank
      @customer = Customer.find(current_customer.id)
      if @customer.update_attributes(params[:customer])
        set_flash_message :notice, :updated
        # Sign in the customer bypassing validation in case his password changed
        sign_in @customer, :bypass =&gt; true
        redirect_to after_update_path_for(@customer)
      else
        render "edit"
      end
    end
  
    def edit
     @customer = current_customer
    end
  end
  </code></pre>
  
  <p>Controller</p>
  
  <pre><code>class UsermanagementsController &lt; ApplicationController
    def index
      @usermngmts = Customer.paginate(:page =&gt; params[:page], :per_page =&gt; 30)
    end
    def show
      @usermngmts = Customer.find(params[:id])
    end
  end
  </code></pre>
  
  <p>Views registration/edit.html.erb</p>
  
  <pre><code># i am trying to designate this one for public view
  &lt;%= form_for(resource, :as =&gt; resource_name, :url =&gt; registration_path(resource_name), :html =&gt; { :method =&gt; :put })  do |f| %&gt;
  ...
  &lt;% end %&gt;
  </code></pre>
  
  <p>This works</p>
  
  <p>Views
  usermanagements/index.html.erb</p>
  
  <pre><code>&lt;% @usermngmts.each do |usrmngmt| %&gt;
      &lt;%= usrmngmt.incomplete_name %&gt;
      &lt;%= link_to ... i would like to go to the edit of usermanagement controller but get usermngents/userid/edit %&gt;
      &lt;/div&gt;
  &lt;% end%&gt;
  </code></pre>
  
  <p>What the best approach to not mix those two controllers</p>