Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions app/controllers/groups_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,9 @@ def update_restaurant
@group = current_user.groups.find(1)
@group_users = @group.users.all
# render json: params

# puts params

@resto = params[:resto_name]
# puts @resto
@group_users.each do |user|
Expand Down
8 changes: 4 additions & 4 deletions app/views/devise/registrations/new.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,11 @@
<%= devise_error_messages! %>
<div class="field">
<%= f.label :name %><br/>
<%= f.text_field :name %>
<%= f.text_field :name, :required => true %>
</div>
<div class="field">
<%= f.label :email %><br/>
<%= f.email_field :email %>
<%= f.email_field :email , :required => true%>
</div>

<div class="field">
Expand All @@ -17,12 +17,12 @@
<em>(<%= @minimum_password_length %>
characters minimum)</em>
<% end %><br/>
<%= f.password_field :password, autocomplete: "off" %>
<%= f.password_field :password, autocomplete: "off", :required => true %>
</div>

<div class="field">
<%= f.label :password_confirmation %><br/>
<%= f.password_field :password_confirmation, autocomplete: "off" %>
<%= f.password_field :password_confirmation, autocomplete: "off", :required => true %>
</div>

<div class="actions">
Expand Down
5 changes: 3 additions & 2 deletions app/views/devise/sessions/new.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,15 @@
<h2>Log in</h2>

<%= form_for(resource, as: resource_name, url: session_path(resource_name)) do |f| %>
<%= devise_error_messages! %>
<div class="field">
<%= f.label :email %><br />
<%= f.email_field :email, autofocus: true %>
<%= f.email_field :email, autofocus: true , :required => true%>
</div>

<div class="field">
<%= f.label :password %><br />
<%= f.password_field :password, autocomplete: "off" %>
<%= f.password_field :password, autocomplete: "off" , :required => true%>
</div>

<% if devise_mapping.rememberable? -%>
Expand Down
4 changes: 2 additions & 2 deletions app/views/groups/index.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@
<%#= link_to "New", new_group_path %>
<h5>Hi <%= current_user.name %></h5>
<div class="col-md-12">
<%= form_for @group do |f| %>
<%= form_for @group, {:class => "form-group"} do |f| %>
<%= f.text_field :name%>
<%= f.submit("create group") %>
<%= f.submit class:"btn btn-primary" %>
<% end %>

<div class="">
Expand Down
3 changes: 3 additions & 0 deletions app/views/layouts/application.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,9 @@
</div>
<% end %>
<div class="d-flex flex-column col p-0" id="main">
<%- flash.each do |name, msg| -%>
<%= content_tag :div, msg, :id => "flash_#{name}" if msg.is_a?(String) %>
<%- end -%>
<%= yield %>
</div>
</div>
Expand Down
2 changes: 1 addition & 1 deletion db/schema.rb
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@
end

create_table "users", force: :cascade do |t|
t.string "name"
t.string "name", default: "", null: false
t.string "email", default: "", null: false
t.string "encrypted_password", default: "", null: false
t.string "reset_password_token"
Expand Down