title: NoMethodError: undefined method `model_name' for Fixnum:Class
body: <p>I run an RSpec testcase that fills a form and submits it. I get the following error:</p>
  
  <pre><code>1) Sign Up Advertiser after adding valid information should create a user
     Failure/Error: expect { click_button submit }.to change(User, :user_key)
     NoMethodError:
       undefined method `model_name' for Fixnum:Class
     # /mnt/hgfs/Projekte/adserve.example.de/app/controllers/advertisers_controller.rb:31:in `tryToCreateUser'
     # /mnt/hgfs/Projekte/adserve.example.de/app/controllers/advertisers_controller.rb:14:in `create'
     # ./sign_up_advertiser_spec.rb:32:in `block (4 levels) in &lt;top (required)&gt;'
     # ./sign_up_advertiser_spec.rb:32:in `block (3 levels) in &lt;top (required)&gt;'
  </code></pre>
  
  <p>This is the code for the controller:</p>
  
  <pre><code>class AdvertisersController &lt; ApplicationController
  
   ...
  
    def home
      @menuindex = 0
    end
  
    def create
      @user = Advertiser.new (params[:advertiser])
      tryToCreateUser
    end
  
    def tryToCreateUser
      if @user.save
        @user = Advertiser.retrieve(@user.id)
  
        redirect_to home, :notice =&gt; "You successfully signed up " + @user.full_name
      else
        render :action =&gt; "/users/new", :layout =&gt; 'application'
      end
    end
  end
  </code></pre>
  
  <p>And this is what the routes.rb looks like</p>
  
  <pre><code>match "signup_advertiser" =&gt; "advertisers#new", :as =&gt; "signup_advertiser"
  match "signup_publisher" =&gt; "publishers#new", :as =&gt; "signup_publisher"
  
  get "advertisers_home" =&gt; "advertisers#home"
  
  resources :advertisers
  </code></pre>
  
  <p>So I guess the mistake is in the redirect_to part. But I can't figure it out. I fiddled around with rendering a custom action in 'home' and some other stuff. I think it's something pretty basic so help would be very appreciated. Thanks.</p>