Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
V
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
0
Merge Requests
0
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
Tan Phat Nguyen
venshop
Commits
c8a1c53e
Commit
c8a1c53e
authored
Nov 17, 2014
by
Tan Phat Nguyen
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add config file using figago gem
parent
771a14e4
Show whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
15 additions
and
8 deletions
+15
-8
.gitignore
+2
-0
Gemfile
+1
-0
Gemfile.lock
+3
-0
app/views/admin/products/_product.html.erb
+2
-2
app/views/admin/products/show.html.erb
+3
-2
app/views/products/show.html.erb
+1
-1
lib/tasks/db.rake
+3
-3
No files found.
.gitignore
View file @
c8a1c53e
...
@@ -15,4 +15,6 @@
...
@@ -15,4 +15,6 @@
/log/*.log
/log/*.log
/tmp
/tmp
/public/uploads
/public/uploads
# Ignore application configuration
/config/application.yml
/config/application.yml
Gemfile
View file @
c8a1c53e
...
@@ -19,6 +19,7 @@ gem 'mysql2'
...
@@ -19,6 +19,7 @@ gem 'mysql2'
gem
'
vacuum
'
gem
'
vacuum
'
gem
'
kaminari
'
gem
'
kaminari
'
gem
'
devise
'
gem
'
devise
'
gem
"
figaro
"
group
:development
,
:test
do
group
:development
,
:test
do
gem
'
sqlite3
'
,
'1.3.9'
gem
'
sqlite3
'
,
'1.3.9'
...
...
Gemfile.lock
View file @
c8a1c53e
...
@@ -81,6 +81,8 @@ GEM
...
@@ -81,6 +81,8 @@ GEM
i18n (~> 0.5)
i18n (~> 0.5)
ffi (1.9.6)
ffi (1.9.6)
ffi (1.9.6-x64-mingw32)
ffi (1.9.6-x64-mingw32)
figaro (1.0.0)
thor (~> 0.14)
fog (1.23.0)
fog (1.23.0)
fog-brightbox
fog-brightbox
fog-core (~> 1.23)
fog-core (~> 1.23)
...
@@ -289,6 +291,7 @@ DEPENDENCIES
...
@@ -289,6 +291,7 @@ DEPENDENCIES
coffee-rails (= 4.0.1)
coffee-rails (= 4.0.1)
devise
devise
faker (= 1.4.2)
faker (= 1.4.2)
figaro
fog (= 1.23.0)
fog (= 1.23.0)
guard-minitest (= 2.3.1)
guard-minitest (= 2.3.1)
jbuilder (= 2.2.3)
jbuilder (= 2.2.3)
...
...
app/views/admin/products/_product.html.erb
View file @
c8a1c53e
<tr>
<tr>
<td>
<%=
product
.
name
%>
</td>
<td>
<%=
product
.
name
%>
</td>
<td>
<%=
product
.
price
%>
</td>
<td>
$
<%=
product
.
price
%>
</td>
<td>
<%=
product
.
description
%>
</td>
<td>
<%=
raw
product
.
description
%>
</td>
<td>
<%=
product
.
category
.
name
%>
</td>
<td>
<%=
product
.
category
.
name
%>
</td>
<td>
<%=
image_tag
product
.
photo_url
.
to_s
,
width:
'140'
,
height:
'140'
,
class:
'img-rounded'
%>
</td>
<td>
<%=
image_tag
product
.
photo_url
.
to_s
,
width:
'140'
,
height:
'140'
,
class:
'img-rounded'
%>
</td>
<td>
<%=
link_to
'Show'
,
[
:admin
,
product
]
%>
</td>
<td>
<%=
link_to
'Show'
,
[
:admin
,
product
]
%>
</td>
...
...
app/views/admin/products/show.html.erb
View file @
c8a1c53e
<%
provide
(
:title
,
@product
.
name
)
%>
<%
provide
(
:title
,
@product
.
name
)
%>
<h1
class=
'page-header'
>
Show Product
</h1>
<h1
class=
'page-header'
>
Show Product
</h1>
<%=
image_tag
@product
.
photo
.
url
,
width:
'140'
,
height:
'140'
,
class:
'img-rounded'
%>
<br/><br>
<p>
Name:
<b>
<%=
@product
.
name
%>
</b></p>
<p>
Name:
<b>
<%=
@product
.
name
%>
</b></p>
<p>
Price:
<b>
$
<%=
@product
.
price
%>
</b></p>
<p>
Price:
<b>
$
<%=
@product
.
price
%>
</b></p>
<p>
Description:
<b>
<%=
@product
.
description
%>
</b></p>
<p>
Category:
<b>
<%=
@product
.
category
.
name
%>
</b></p>
<p>
Category:
<b>
<%=
@product
.
category
.
name
%>
</b></p>
<
%=
image_tag
@product
.
photo
.
url
,
width:
'140'
,
height:
'140'
,
class:
'img-rounded'
%>
<br/><br
>
<
p>
Description:
</p><b><div>
<%=
raw
@product
.
description
%>
</div></b
>
<%=
link_to
'Back'
,
admin_products_path
,
class:
'btn btn-primary'
%>
<%=
link_to
'Back'
,
admin_products_path
,
class:
'btn btn-primary'
%>
<%=
link_to
'Edit'
,
edit_admin_product_path
(
@product
),
class:
'btn btn-primary'
%>
<%=
link_to
'Edit'
,
edit_admin_product_path
(
@product
),
class:
'btn btn-primary'
%>
\ No newline at end of file
app/views/products/show.html.erb
View file @
c8a1c53e
...
@@ -14,7 +14,7 @@
...
@@ -14,7 +14,7 @@
<div
class=
'row'
>
<div
class=
'row'
>
<b>
Description:
</b>
<b>
Description:
</b>
<p></p>
<p></p>
<
p>
<%=
@product
.
description
%>
</p
>
<
%=
raw
@product
.
description
%
>
</div>
</div>
<div
class=
'row'
>
<div
class=
'row'
>
<%=
button_to
'Buy'
,
line_items_path
(
product_id:
@product
),
class:
'btn btn-default'
%>
<%=
button_to
'Buy'
,
line_items_path
(
product_id:
@product
),
class:
'btn btn-default'
%>
...
...
lib/tasks/db.rake
View file @
c8a1c53e
...
@@ -73,9 +73,9 @@ namespace :db do
...
@@ -73,9 +73,9 @@ namespace :db do
def
build_request
def
build_request
@request
=
Vacuum
.
new
@request
=
Vacuum
.
new
@request
.
configure
(
@request
.
configure
(
aws_access_key_id:
'AKIAI4FGZR4YFCAP4DVQ'
,
aws_access_key_id:
ENV
[
'pusher_aws_access_key_id'
]
,
aws_secret_access_key:
'r+ZlSNRib0FLll9T0WAemasl0Z/dejn8Wyjn3eX0'
,
aws_secret_access_key:
ENV
[
'pusher_aws_secret_access_key'
]
,
associate_tag:
'tag'
associate_tag:
ENV
[
'pusher_associate_tag'
]
)
)
end
end
...
...
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