Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
dhp-venshop
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
1
Merge Requests
1
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Hoang Phuc Do
dhp-venshop
Commits
764def09
Commit
764def09
authored
Jun 12, 2017
by
Hoang Phuc Do
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix merge request #2
parent
78292087
Show whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
6 additions
and
116 deletions
+6
-116
.gitignore
+4
-0
app/admin/dashboard.rb
+0
-20
app/models/product.rb
+2
-0
app/views/devise/confirmations/new.html.erb
+0
-16
app/views/devise/mailer/confirmation_instructions.html.erb
+0
-5
app/views/devise/mailer/unlock_instructions.html.erb
+0
-7
app/views/devise/unlocks/new.html.erb
+0
-16
config/database.yml
+0
-52
No files found.
.gitignore
View file @
764def09
...
@@ -20,3 +20,6 @@
...
@@ -20,3 +20,6 @@
# Ignore public/uploads folder
# Ignore public/uploads folder
/public/uploads/*
/public/uploads/*
# Ignore database config file
/config/database.yml
\ No newline at end of file
app/admin/dashboard.rb
View file @
764def09
...
@@ -9,25 +9,5 @@ ActiveAdmin.register_page 'Dashboard' do
...
@@ -9,25 +9,5 @@ ActiveAdmin.register_page 'Dashboard' do
small
I18n
.
t
(
'active_admin.dashboard_welcome.call_to_action'
)
small
I18n
.
t
(
'active_admin.dashboard_welcome.call_to_action'
)
end
end
end
end
# Here is an example of a simple dashboard with columns and panels.
#
# columns do
# column do
# panel "Recent Posts" do
# ul do
# Post.recent(5).map do |post|
# li link_to(post.title, admin_post_path(post))
# end
# end
# end
# end
# column do
# panel "Info" do
# para "Welcome to ActiveAdmin."
# end
# end
# end
end
# content
end
# content
end
end
app/models/product.rb
View file @
764def09
...
@@ -4,4 +4,5 @@ class Product < ApplicationRecord
...
@@ -4,4 +4,5 @@ class Product < ApplicationRecord
belongs_to
:user
belongs_to
:user
mount_uploader
:image_url
,
PictureUploader
mount_uploader
:image_url
,
PictureUploader
validates
:category_id
,
presence:
true
validates
:category_id
,
presence:
true
validates
:user_id
,
presence:
true
end
end
\ No newline at end of file
app/views/devise/confirmations/new.html.erb
deleted
100644 → 0
View file @
78292087
<h2>
Resend confirmation instructions
</h2>
<%=
form_for
(
resource
,
as:
resource_name
,
url:
confirmation_path
(
resource_name
),
html:
{
method: :post
})
do
|
f
|
%>
<%=
devise_error_messages!
%>
<div
class=
"field"
>
<%=
f
.
label
:email
%>
<br
/>
<%=
f
.
email_field
:email
,
autofocus:
true
,
value:
(
resource
.
pending_reconfirmation?
?
resource
.
unconfirmed_email
:
resource
.
email
)
%>
</div>
<div
class=
"actions"
>
<%=
f
.
submit
"Resend confirmation instructions"
%>
</div>
<%
end
%>
<%=
render
"devise/shared/links"
%>
app/views/devise/mailer/confirmation_instructions.html.erb
deleted
100644 → 0
View file @
78292087
<p>
Welcome
<%=
@email
%>
!
</p>
<p>
You can confirm your account email through the link below:
</p>
<p>
<%=
link_to
'Confirm my account'
,
confirmation_url
(
@resource
,
confirmation_token:
@token
)
%>
</p>
app/views/devise/mailer/unlock_instructions.html.erb
deleted
100644 → 0
View file @
78292087
<p>
Hello
<%=
@resource
.
email
%>
!
</p>
<p>
Your account has been locked due to an excessive number of unsuccessful sign in attempts.
</p>
<p>
Click the link below to unlock your account:
</p>
<p>
<%=
link_to
'Unlock my account'
,
unlock_url
(
@resource
,
unlock_token:
@token
)
%>
</p>
app/views/devise/unlocks/new.html.erb
deleted
100644 → 0
View file @
78292087
<h2>
Resend unlock instructions
</h2>
<%=
form_for
(
resource
,
as:
resource_name
,
url:
unlock_path
(
resource_name
),
html:
{
method: :post
})
do
|
f
|
%>
<%=
devise_error_messages!
%>
<div
class=
"field"
>
<%=
f
.
label
:email
%>
<br
/>
<%=
f
.
email_field
:email
,
autofocus:
true
%>
</div>
<div
class=
"actions"
>
<%=
f
.
submit
"Resend unlock instructions"
%>
</div>
<%
end
%>
<%=
render
"devise/shared/links"
%>
config/database.yml
deleted
100644 → 0
View file @
78292087
# MySQL. Versions 5.1.10 and up are supported.
#
# Install the MySQL driver
# gem install mysql2
#
# Ensure the MySQL gem is defined in your Gemfile
# gem 'mysql2'
#
# And be sure to use new-style password hashing:
# http://dev.mysql.com/doc/refman/5.7/en/old-client.html
#
default
:
&default
adapter
:
mysql2
encoding
:
utf8
username
:
root
password
:
development
:
<<
:
*default
database
:
dhp_venshop_development
# Warning: The database defined as "test" will be erased and
# re-generated from your development database when you run "rake".
# Do not set this db to the same as development or production.
test
:
<<
:
*default
database
:
dhp_venshop_test
# As with config/secrets.yml, you never want to store sensitive information,
# like your database password, in your source code. If your source code is
# ever seen by anyone, they now have access to your database.
#
# Instead, provide the password as a unix environment variable when you boot
# the app. Read http://guides.rubyonrails.org/configuring.html#configuring-a-database
# for a full rundown on how to provide these environment variables in a
# production deployment.
#
# On Heroku and other platform providers, you may have a full connection URL
# available as an environment variable. For example:
#
# DATABASE_URL="mysql2://myuser:mypass@localhost/somedatabase"
#
# You can use this database configuration with:
#
# production:
# url: <%= ENV['DATABASE_URL'] %>
#
production
:
<<
:
*default
database
:
dhp_venshop_production
username
:
dhp_venshop
password
:
<%= ENV['DHP_VENSHOP_DATABASE_PASSWORD'] %>
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment