title: Messaging in Rails 3
body: <p>I've been setting up a user to user messaging system using this rails tutorial <a href="http://www.novawave.net/public/rails_messaging_tutorial.html" rel="nofollow">http://www.novawave.net/public/rails_messaging_tutorial.html</a></p>
  
  <p>I know its pretty old but I haven't really had a problem tweaking it to work now. My only problem is that the inbox is not displaying and the error that appears is "Couldn't find Folder without an ID" I'm not sure what I should do. My code is pretty much the same, besides some tweaks, with the code in that link until right before reply. Thats where I stopped.</p>
  
  <p>My Folder Model looks like </p>
  
  <pre><code>class Folder &lt; ActiveRecord::Base
    acts_as_tree
    belongs_to :user
    has_many :messages, :class_name =&gt; "MessageCopy"
  end
  </code></pre>
  
  <p>My Mailbox controller looks like</p>
  
  <pre><code>class MailboxController &lt; ApplicationController
  
    def index
      redirect_to new_session_path and return unless signed_in?
      @folder = current_user.inbox
      show
      render :action =&gt; "show"
    end
  
    def show
      @folder ||= current_user.folders.find(params[:id])
      @messages = @folder.messages.paginate :per_page =&gt; 10, :page =&gt; params[:page], :include       =&gt; :message, :order =&gt; "messages.created_at DESC"
    end
  end
  </code></pre>
  
  <p>If any other code needs to be included let me know. </p>