title: uninitialized constant with rails friendships
body: <p>I'm new to rails and getting the following error:</p>
  
  <pre><code>NameError in FriendshipsController#create  
  uninitialized constant FriendshipsController
  </code></pre>
  
  <p>this also shows up:</p>
  
  <pre><code>{"authenticity_token"=&gt;"eQvv3flATE+P1TEErOWP/6fM8dEOIBxltobCxtM/F18=",
   "friend_id"=&gt;"32"}
  </code></pre>
  
  <p>When I click on the "Add Friend" Link on my users show page.  I am following the railscast about self referential associations to a T, but I keep getting this error and I can't find any information about it, not even what "uninitialized constant" means. I've gathered from the internet that it MAY be related to the acts_as_authenticated plugin, but I followed the one fix I found and it didn't work.</p>
  
  <p>Here is the code from my user/show.html.erb page:</p>
  
  <pre><code>&lt;%= link_to "Add Friend", friendships_path(:friend_id =&gt; @user.id), :method =&gt; :post %&gt; 
  </code></pre>
  
  <p>and the code from my friendships controller: </p>
  
  <pre><code>def create
    @friendship = current_user.friendships.build(:friend_id =&gt; params[:friend_id])
    if @friendship.save
      flash[:notice] = "Added friend."
      redirect_to root_url
    else
      flash[:error] = "Unable to add friend."
      redirect_to root_url
    end
  end
  </code></pre>
  
  <p>Where am I going wrong here.  I haven't the faintest clue what is causing this.  Please let me know if I am missing any needed code.</p>