I am receiving a syntax error, unexpected =>, expecting '}' in my the following view code:
<%= render :partial => 'form', :locals => { :message => @message, :user => @user} %>
I am rendering the partial from my new.html page. The partial looks right to my eyes but perhaps I am missing something?
_form.html.erb:
<%= form_for message, :url => user_messages_path(user), :html => {:class => "MainForm"} do |f| %>
<%if message.reply_to%>
<%=f.hidden_field :to%>
<%=f.hidden_field :parent_id%>
<%else%>
<%label{:for => 'message_to'} %>
<%=:to.l%>
<%em= "(" + :type_a_username.l + ")"%>
<%= text_field_tag 'message[to]', @message.to, {:autocomplete => "off", :size => 35, :id => "message_to"}%>
<% auto_complete%>#message_to_auto_complete
<%content_for :end_javascript do%>
<%= auto_complete_field 'message_to', {:url => auto_complete_for_username_user_messages_path(@user), :tokens=>','}%>
<%if @reply %>
<%= f.hidden_field :subject %>
<%else%>
<%label{:for => 'message_subject'}= :subject.l + ":"%>
<%= f.text_field :subject%>
<%label{:for => "message_body"}= :message.l + ":"%>
<%= f.text_area :body%>
<%p%>
<%= submit_tag :send.l%>
render partial: 'form', locals: {message: @message, user: @user})