On 13 March 2015 at 16:44, Roelof Wobben <rwobben@hotmail.com> wrote:
> Wierd. I do not see it this time.
> Maybe a hickup in a server,
>
> But now I see another wierd error.
>
> I have a page new who looks like this :
>
> <h1>New product</h1>
> <%= render 'form' %>
> <%= link_to 'Back', products_path %>
>
> Which leads to a file named _form.html who looks like this :
I presume you mean _form.erb.
>
> <%= form_for(@product) do |f| %>
> <% if @product.errors.any? %>
Where is the end for this if?
> <div id="error_explanation">
> <h2><%= pluralize(@product.errors.count, "error") %> prohibited this
> product from being saved:</h2>
> <div class="row">
> <div class="span9">
> <div class="register">
> <div class="titleHeader clearfix">
> <h3>Voer nieuw speelgoed in </h3>
> </div><!--end titleHeader-->
> <form method="post" action="http://egythemes.com/shopfine/page"
> class="form-horizontal">
Nested forms are not valid html, though that is not the cause of the
syntax error.
> <h4> 1. Algemene informatie </h4>
> <div class="control-group ">
> <label class="control-label" for="inputFirstName">Nummer
> speelgoed: <span class="text-error">*</span></label>
> <div class="controls">
> <input type="text" id="inputFirstName">
>
> </div>
> </div><!--end control-group-->
> <div class="control-group ">
> <label class="control-label" for="inputLastName">Naam speelgoed:
> <span class="text-error">*</span></label>
> <div class="controls">
> <input type="text" id="inputLastName">
> </div>
> </div><!--end control-group-->
> <div class="control-group">
> <label class="control-label" for="inputEMAdd">Omschrijving:
> <span class="text-error">*</span></label>
> <div class="controls">
> <input type="text" id="inputEMAdd" >
> </div>
> </div><!--end control-group-->
>
> <h4> 2. Koop informatie </h4>
> <div class="control-group">
> <label class="control-label" for="inputCompany">Bedrijf:<span
> class="text-error">*</span></label>
> <div class="controls">
> <input type="text" id="inputCompany">
> </div>
> </div><!--end control-group-->
> <div class="control-group">
> <label class="control-label" for="inputCompanyID">Bedrag:<span
> class="text-error">*</span></label>
> <div class="controls">
> <input type="text" id="inputCompanyID">
> </div>
> </div><!--end control-group-->
> <div class="control-group">
> <label class="control-label" for="inputFirstAdd">Datum aankoop:
> <span class="text-error">*</span></label>
> <div class="controls">
> <input type="text" id="inputFirstAdd">
> </div>
> </div><!--end control-group-->
> <div class="control-group">
> <div class="controls">
> <button type="submit" class="btn
> btn-primary">Opslaan</button>
> </div>
> </div><!--end control-group-->
>
>
> </form><!--end form-->
> </div><!--end register-->
> </div><!--end span9-->
>
>
> </div><!--end row-->
> <% end %>
>
> But as soon as I do products/new I see this error message :
>
> /home/action/workspace/finance/app/views/products/_form.html.erb:85: syntax
> error, unexpected keyword_ensure, expecting keyword_end
> /home/action/workspace/finance/app/views/products/_form.html.erb:87: syntax
> error, unexpected end-of-input, expecting keyword_end
That means that it expected more code, which almost always means
missing end statements.
Colin
--
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to rubyonrails-talk+unsubscribe@googlegroups.com.
To post to this group, send email to rubyonrails-talk@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/rubyonrails-talk/CAL%3D0gLsS1D18s9MpKiaUXnOiBAAk8STRu%2BnrXONqvxT4d6bCHA%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.
No comments:
Post a Comment