title: Rails: form for different controller
body: <p>I'm developing a rails app with a landingpage. On the landingpage, the user can sign up for the app. For login, there is an extra view with an extra controller.</p>
  
  <p>It looks like this:</p>
  
  <pre><code>views/landinpage/index.html --&gt; sign up form
  views/login/index.html --&gt; login form
  </code></pre>
  
  <p>but I only want to have one controller</p>
  
  <pre><code>controllers/login_controller --&gt; create new user from sign up form &amp; check login data
  </code></pre>
  
  <p>so I have to get a connection between the landingpage view and the login_controller.</p>
  
  <p>This is my attempt:</p>
  
  <pre><code>&lt;%= form_for @login, :url =&gt; { :controller =&gt; "login_controller", :action =&gt; "create" }, :html =&gt; {:method =&gt; :post} do |f| %&gt;
  </code></pre>
  
  <p>but it throws a route error:</p>
  
  <pre><code>No route matches {:controller=&gt;"login_controller", :action=&gt;"create"}
  </code></pre>
  
  <p>I already defined login resources in routes.rb, but it seems that the problem is elsewhere?</p>
  
  <pre><code>resources :logins
  </code></pre>
  
  <p>any ideas?</p>