I have the following error showing, not sure what went wrong... My codes are below. Line39 is <% end %> and line 46&48 are empty.
/home/ubuntu/section3/alpha-blog/app/views/users/_form.html.erb:39: syntax error, unexpected keyword_end, expecting ')' '.freeze; end ^ /home/ubuntu/section3/alpha-blog/app/views/users/_form.html.erb:46: syntax error, unexpected keyword_ensure, expecting ')' /home/ubuntu/section3/alpha-blog/app/views/users/_form.html.erb:48: syntax error, unexpected keyword_end, expecting ')'
<%= render 'shared/errors', obj: @user%>
<div class= 'row'>
<div class = 'col-xs-12'>
<%= form_for(@user, :html => {class: "form-horizontal", role: "form"}) do |f| %>
<div class="form-group">
<div class= "control-label col-sm-2">
<%= f.label :username %>
</div>
<div class="col-sm-8">
<%= f.text_field :username, class: "form-control", placeholder: "enter username", autofocus: true %>
</div>
</div>
<div class= "form-group">
<div class="control-label col-sm-2">
<%= f.label :email %>
</div>
<div class = "col-sm-8">
<%= f.email_field :email, class: "form-control", placeholder: "Enter email" %>
</div>
</div>
<div class = "form-group">
<div class= "control-label col-sm-2">
<%= f.label :password %>
</div>
<div class = "col-sm-8">
<%= f.password_field :password, class: "form-control", placeholder: "Enter password" %>
</div>
</div>
<div class= "form-group" >
<div class = "col-sm-offset-2 col-sm-10">
<%= f.submit(@user.new_record? ? "Sign up": "Update account", class: 'btn btn-primary btn-lg' %>
</div>
</div>
<% end %>
<div class = "col-xs-4 col-xs-offset-4">
[<%= link_to "Cancel request and return to articles listing", articles_path %> ]
</div>
</div>
</div>
Aucun commentaire:
Enregistrer un commentaire