title: Syntax Error, Unexpected (arg, expecting keyword_do error message in Rails
body: <p>When I attempt to  load the page I'm getting the following error message:</p>
  
  <p>syntax error, unexpected ( arg, expecting keyword_do or '{' or '(' link_to "UP", link_vote_path (link) )</p>
  
  <p>The line in reference is pointing to is the second and third line here:</p>
  
  <pre><code>    &lt;td&gt;&lt;%= link.totalcount %&gt;&lt;/td&gt;
      &lt;td&gt;&lt;%= link_to "UP", link_vote_path (link) %&gt;&lt;/td&gt;
      &lt;td&gt;&lt;%= link_to "DOWN", link_down_vote_path (link) %&gt;&lt;/td&gt;
  </code></pre>
  
  <p>I believe I have the correct route in place so I'm a bit confused as to the error message.</p>
  
  <p>Basically I'm trying to add in a simple counter in Rails that allows for voting up and down. Using the following routes:</p>
  
  <pre><code>           link_vote GET    /links/:link_id/vote(.:format)      links#vote
        link_link_vote GET    /links/:link_id/link_vote(.:format) links#link_vote
        link_down_vote GET    /links/:link_id/down_vote(.:format) links#down_vote
  </code></pre>
  
  <p>And have the following in my controller: </p>
  
  <pre><code>  def create
      @link = Link.new(link_params)
      @link.user = current_user
      @link.totalcount = @link.votes.count
        if @link.save
          redirect_to @link
        else
          render :new
        end
      respond_to do |format|
        if @link.save
          format.html { redirect_to @link, notice: 'Link was successfully created.' }
          format.json { render :show, status: :created, location: @link }
         else
          format.html { render :new }
          format.json { render json: @link.errors, status: :unprocessable_entity }
        end
      end
    end
  
    def vote
      if current_user
        @link.vote &lt;&lt; Vote.create!(user_id: @link.user_id, link_id: @link.id)
        @link.totalcount = @link.votes.count
        @link.save
        redirect_to :root
      else
        redirect_to :login
      end
    end
  
    def link_vote
      @link.votes &lt;&lt; Vote.create!(user_id: @link.user_id, link_id: @link.id)
      @link.totalcount = @link.votes.count
      @link.save
      redirect_to :root
    end
  
    def down_vote
      @link.votes.last.destroy
      @link.totalcount = @link.votes.count
      @link.save
      redirect_to :root
    end
  </code></pre>
  
  <p>Am I missing something in my controller that's affecting the counter?</p>