Newbie help


#1

Hi …

I am new to Rails and it is not clear to me why I am getting the
following error. Any help appreciated.

-m.

$cat app/views/admin/new.rhtml

<% @page_title = “New member…” -%>
<%= start_form_tag( :action => ‘create’ ) %>

                   </table>

<%= link_to ‘Back’, :action => ‘list’ %>
<%= end_form_tag %>

In browser:

Showing app/views/admin/new.rhtml where line #8 raised:

compile error
script/…/config/…/app/views/admin/new.rhtml:8: parse error, unexpected
‘;’, expecting ‘)’
_erbout.concat "

\n”
                          ^

script/…/config/…/app/views/admin/new.rhtml:12: parse error,
unexpected ‘;’, expecting ‘)’
_erbout.concat "

\n”

-mark.


Mark Probert probertm at acm dot org

-mark.

First Name: <%= text_field( "member", "first_name", size => 40 %>
Last Name: <%= text_field( "member", "last_name", size => 40 %>
<%= submit_tag "Create" %>
“; _erbout.concat(( text_field( “member”,
“first_name”, size => 40 ).to_s); _erbout.concat "
“; _erbout.concat(( text_field( “member”,
“last_name”, size => 40 ).to_s); _erbout.concat "

#2

Looks to me like you’ve forgotten to close the parentheses and there’s
a missing colon on the lines that call text_field, so:

  <td> <%= text_field( "member", "first_name", size => 40 %> </td>

should be:

  <td> <%= text_field( "member", "first_name", :size => 40 ) %> 

Hope that helps,
David


#3

Hi,

I think you are missing a closing parentheses.

text_field( “member”, “first_name”, size => 40

should be

text_field( “member”, “first_name”, size => 40)

Good luck,
the other Ezra


#4

Hi …

David T. wrote:

Looks to me like you’ve forgotten to close the parentheses …

Doh! My apologies for time wasting …

-mark.