Problem in new.rhtml file

Hello,

My database is MySQL5 and has this structure:

NAME: gigolo_development

TABLES

  • Gigolos( id,name,description,photo )
  • Services( id, name, description, quote )
  • Service_Gigolos( id, service_id, gigolo_id )

I’m trying to add a new Service_Gigolo and this is my current
new.rhtml page:

New service_gigolo

<%= start_form_tag :action => ‘create’ %>

<%for gigolo in @gigolos%>

<%gigolo.column(name)%>


<%= submit_tag “Create” %>
<%= end_form_tag %>

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

When trying to use this page, I get the following errors:

  • ./script/…/config/…/app/views/service_gigolos/new.rhtml:12: syntax
    error

It then says:

Extracted source (around line #12):

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

I’m very new to ruby, so I’m sure I’m not following the
rules, but I’m not sure what I’m getting wrong.

I can add a full trace if you think that would help.

Any hints on what is going on or resources I might look at to
improve my rhtml writing skills?

TIA,

Andrew

You’ve forgotten to close your for loop. The error comes after the
last line because thats the last place it was trying to find your <%
end % >.

You’d probably gain some more incite into rhtml on the rails list
http://groups.google.com/group/rubyonrails-talk .

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs