1

i tried to make a partial form.but an error like this occured:

SyntaxError in Vorlesungs#new

Showing /home/babak/Management/app/views/vorlesungs/_Form.erb where line #1 raised:

compile error
/home/babak/Management/app/views/vorlesungs/_Form.erb:1: dynamic constant assignment
..._assigns[:submit_lable];Form = local_assigns[:Form];;@output...
                              ^
Extracted source (around line #1):

1: <html>
2: <body>
3: <p>
4: <table>

that is my _Form code:

<html>
<body>
<p>
<table>
  <tr align="center" style="width: 100%">
    <td width="25%"></td>
    <td width="50%">
      <table>
        <tr>
          <td>Name : </td>
          <td><%= v.text_field :Name %> </td>
        </tr>
        <tr>
          <td>Name de Professur :</td>
          <td><%= v.text_field :Leiter_name %></td>
        </tr>
        <tr>
          <td>Proffesuren :</td>
          <td><%= v.text_field :Professuren %></td>
        </tr>
        <tr>
          <td> <%= submit_tag submit_lable%></td>
        </tr>
      </table>
    </td>
    <td width="25%"></td>

  </tr>
</table>
</p>
</body>
</html>

and in my view:

<%= form_for(@vorlesung) do |v| %>
    <%= render :partial => 'Form',:locals => {:v =>v,:submit_lable =>'Update'} %>
<% end %>

Thank you for your helps

0

1 Answer 1

2

Make your partial name lowercase.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.