clean up
This commit is contained in:
commit
a52c50531e
2 changed files with 28 additions and 1 deletions
|
@ -1,5 +1,5 @@
|
|||
class Order < ActiveRecord::Base
|
||||
belongs_to :users
|
||||
belongs_to :user
|
||||
has_many :order_products
|
||||
has_many :products, through: :order_products
|
||||
|
||||
|
|
27
app/views/users/edit.html.erb
Normal file
27
app/views/users/edit.html.erb
Normal file
|
@ -0,0 +1,27 @@
|
|||
<h1>Update user</h1>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-md-6 col-md-offset-3">
|
||||
<%= form_for(@user) do |f| %>
|
||||
<%= render partial: 'errors', locals: { model: @user } %>
|
||||
|
||||
<%= f.label :nickname %>
|
||||
<%= f.text_field :nickname %>
|
||||
|
||||
<%= f.label :name %>
|
||||
<%= f.text_field :name %>
|
||||
|
||||
<%= f.label :last_name %>
|
||||
<%= f.text_field :last_name %>
|
||||
|
||||
<%= f.label :password %>
|
||||
<%= f.password_field :password %>
|
||||
|
||||
<%= f.label :password_confirmation, "Confirmation" %>
|
||||
<%= f.password_field :password_confirmation %>
|
||||
|
||||
<%= f.submit "Save changes", class: "btn btn-primary" %>
|
||||
<% end %>
|
||||
|
||||
</div>
|
||||
</div>
|
Loading…
Reference in a new issue