Commit d0ac7edb by Tan Phat Nguyen

product list, send email reset password

parent 80120100
......@@ -7,6 +7,7 @@
<ul class='nav navbar-nav navbar-right'>
<li><%= link_to 'Home', root_path %></li>
<% if user_signed_in? %>
<li><%= link_to 'Products', admin_products_path %></li>
<li class="dropdown">
<a href="#" class="dropdown-toggle" data-toggle="dropdown">
Account <b class="caret"></b>
......
<h2>Change your password</h2>
<%= form_for(resource, as: resource_name, url: password_path(resource_name), html: { method: :put }) do |f| %>
<%= devise_error_messages! %>
<%= render 'shared/error_messages', object: f.object %>
<%= f.hidden_field :reset_password_token %>
<div class="field">
<%= f.label :password, "New password" %><br />
<%= f.password_field :password, autofocus: true, autocomplete: "off" %>
<div class="form-group">
<%= f.label :password, "New password" %>
<%= f.password_field :password, autofocus: true, autocomplete: "off", class: 'form-control', placeholder: 'Input new password' %>
</div>
<div class="field">
<%= f.label :password_confirmation, "Confirm new password" %><br />
<%= f.password_field :password_confirmation, autocomplete: "off" %>
</div>
<div class="actions">
<%= f.submit "Change my password" %>
<div class="form-group">
<%= f.label :password_confirmation, "Confirm new password" %>
<%= f.password_field :password_confirmation, autocomplete: "off", class: 'form-control', placeholder: 'Input confirm password' %>
</div>
<%= f.submit "Change my password", class: 'btn btn-primary' %>
<% end %>
<%= render "devise/shared/links" %>
......@@ -14,18 +14,7 @@ Rails.application.configure do
config.action_controller.perform_caching = false
# Don't care if the mailer can't send.
config.action_mailer.raise_delivery_errors = false
config.action_mailer.delivery_method = :smtp
config.action_mailer.smtp_settings = {
address: 'smtp.gmail.com',
port: 587,
domain: 'gmail.com',
authentication: 'plain',
user_name: ENV['email_user'],
password: ENV['email_password'],
enable_starttls_auto: true
}
config.action_mailer.raise_delivery_errors = true
# Print deprecation notices to the Rails logger.
config.active_support.deprecation = :log
......@@ -46,6 +35,16 @@ Rails.application.configure do
# Raises error for missing translations
# config.action_view.raise_on_missing_translations = true
config.action_mailer.default_url_options = { host: 'localhost', port: 3000 }
config.action_mailer.delivery_method = :smtp
config.action_mailer.smtp_settings = {
address: 'smtp.gmail.com',
port: 587,
domain: 'gmail.com',
authentication: 'plain',
user_name: ENV['email_user'],
password: ENV['email_password'],
enable_starttls_auto: true
}
config.solr_host = "http://localhost:8983/solr/collection1"
......
......@@ -10,7 +10,7 @@ Devise.setup do |config|
# Configure the e-mail address which will be shown in Devise::Mailer,
# note that it will be overwritten if you use your own mailer class
# with default "from" parameter.
config.mailer_sender = 'please-change-me-at-config-initializers-devise@example.com'
config.mailer_sender = 'bigforest20@gmail.com'
# Configure the class responsible to send e-mails.
# config.mailer = 'Devise::Mailer'
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment