title: formal argument cannot be an instance variable def trash_folder @trash ||= current_user.mailbox.trash.all end ^
body: <p>I'm implementing the mailboxer gem into my app and thought this should work but getting the error above, I think it has to do with ||= operator</p>
  
  <p>I'm getting this</p>
  
  <pre><code>    conversations_controller.rb:16: formal argument cannot be an instance variable def     
  
  trash_folder @trash ||= current_user.mailbox.trash.all end ^    
  
  /home/action/booklist/app/controllers/conversations_controller.rb:16: syntax error,      
  
  unexpected tOP_ASGN, expecting ';' or '\n' def trash_folder @trash ||=  
  
  current_user.mailbox.trash.all end ^ 
  
  /home/action/booklist/app/controllers/conversations_controller.rb:18: syntax error,  unexpected '.', expecting ';' or '\n' def trash conversation.move_to_trash(current_user) 
  
  ... ^ /home/action/booklist/app/controllers/conversations_controller.rb:18: syntax  
  
  error, unexpected tIDENTIFIER, expecting end-of-input ...rash(current_user) redirect_to 
  
  :conversations end ... ^
  </code></pre>
  
  <p>Conversations_controller:</p>
  
  <pre><code>class ConversationsController &lt; ApplicationController
  
  helper_method :mailbox, :conversation
  
  
  def index
  @conversations ||= current_user.mailbox.inbox.all
  end
  
  
   def reply
    current_user.reply_to_conversation(conversation, *message_params(:body, :subject))
   redirect_to conversation
   end
  
  def trash_folder     @trash ||= current_user.mailbox.trash.all   end
  
  def trash  conversation.move_to_trash(current_user)  redirect_to :conversations end 
  
  def untrash  conversation.untrash(current_user)  redirect_to :back end
  
  def empty_trash   current_user.mailbox.trash.each do |conversation|       conversation.receipts_for(current_user).update_all(:deleted =&gt; true)
   end
  redirect_to :conversations
  end
  
  
  private
  
  def mailbox
  @mailbox ||= current_user.mailbox
  end
  
  def conversation
   @conversation ||= mailbox.conversations.find(params[:id])
  end
  
  def conversation_params(*keys)
   fetch_params(:conversation, *keys)
  end
  
  def message_params(*keys)
   fetch_params(:message, *keys)
  end
  
  def fetch_params(key, *subkeys)
   params[key].instance_eval do
     case subkeys.size
   when 0 then self
   when 1 then self[subkeys.first]
   else subkeys.map{|k| self[k] }
       end
  
  end
  
  end
  </code></pre>
  
  <p>Conversations view index:</p>
  
  <pre><code>&lt;% @conversations.each do |conversation| %&gt;
  
  &lt;% if participant != current_user %&gt;
   &lt;%= participant.name, participant %&gt;
  &lt;% end %&gt;
  
  &lt;%= link_to conversation.subject, conversation %&gt;
  &lt;%= conversation.updated_at.strftime("%a, %m/%e/%Y %I:%M %p") %&gt;
  &lt;%= link_to "Move to Trash", {:controller =&gt; "conversations", :action =&gt; "trash", :id =&gt; conversation.id}, :title=&gt; "Move to Trash", :method=&gt;'post' %&gt;
  &lt;% end %&gt;
  </code></pre>
  
  <p>and link to the inbox in the current_user_session path</p>
  
  <pre><code>&lt;%= link_to "inbox", conversations_path %&gt;
  </code></pre>
  
  <p>I have other views but I think the issue is in the conversations controller. I'm not sure what's going on with these errors, it should work</p>