Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
S
sample_app
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
Đường Sỹ Hoàng
sample_app
Commits
7684c992
Commit
7684c992
authored
Nov 12, 2019
by
Đường Sỹ Hoàng
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixed identation & double quote
parent
2b492193
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
17 additions
and
18 deletions
+17
-18
app/mailers/application_mailer.rb
+2
-2
config.ru
+1
-1
config/environments/development.rb
+5
-5
config/environments/production.rb
+8
-8
config/routes.rb
+1
-2
No files found.
app/mailers/application_mailer.rb
View file @
7684c992
class
ApplicationMailer
<
ActionMailer
::
Base
class
ApplicationMailer
<
ActionMailer
::
Base
default
from:
'from@example.com'
default
from:
"from@example.com"
layout
'mailer'
layout
"mailer"
end
end
config.ru
View file @
7684c992
# This file is used by Rack-based servers to start the application.
# This file is used by Rack-based servers to start the application.
require_relative
'config/environment'
require_relative
"config/environment"
run
Rails
.
application
run
Rails
.
application
config/environments/development.rb
View file @
7684c992
Rails
.
application
.
configure
do
Rails
.
application
.
configure
do
# Settings specified here will take precedence over those in config/application.rb.
# Settings specified here will take precedence over those in config/application.rb.
# In the development environment your application
'
s code is reloaded on
# In the development environment your application
"
s code is reloaded on
# every request. This slows down response time but is perfect for development
# every request. This slows down response time but is perfect for development
# since you don
'
t have to restart the web server when you make code changes.
# since you don
"
t have to restart the web server when you make code changes.
config
.
cache_classes
=
false
config
.
cache_classes
=
false
# Do not eager load code on boot.
# Do not eager load code on boot.
...
@@ -13,12 +13,12 @@ Rails.application.configure do
...
@@ -13,12 +13,12 @@ Rails.application.configure do
config
.
consider_all_requests_local
=
true
config
.
consider_all_requests_local
=
true
# Enable/disable caching. By default caching is disabled.
# Enable/disable caching. By default caching is disabled.
if
Rails
.
root
.
join
(
'tmp/caching-dev.txt'
).
exist?
if
Rails
.
root
.
join
(
"tmp/caching-dev.txt"
).
exist?
config
.
action_controller
.
perform_caching
=
true
config
.
action_controller
.
perform_caching
=
true
config
.
cache_store
=
:memory_store
config
.
cache_store
=
:memory_store
config
.
public_file_server
.
headers
=
{
config
.
public_file_server
.
headers
=
{
'Cache-Control'
=>
"public, max-age=
#{
2
.
days
.
seconds
.
to_i
}
"
"Cache-Control"
=>
"public, max-age=
#{
2
.
days
.
seconds
.
to_i
}
"
}
}
else
else
config
.
action_controller
.
perform_caching
=
false
config
.
action_controller
.
perform_caching
=
false
...
@@ -26,7 +26,7 @@ Rails.application.configure do
...
@@ -26,7 +26,7 @@ Rails.application.configure do
config
.
cache_store
=
:null_store
config
.
cache_store
=
:null_store
end
end
# Don
't care if the mailer can'
t send.
# Don
"t care if the mailer can"
t send.
config
.
action_mailer
.
raise_delivery_errors
=
false
config
.
action_mailer
.
raise_delivery_errors
=
false
config
.
action_mailer
.
perform_caching
=
false
config
.
action_mailer
.
perform_caching
=
false
...
...
config/environments/production.rb
View file @
7684c992
...
@@ -21,7 +21,7 @@ Rails.application.configure do
...
@@ -21,7 +21,7 @@ Rails.application.configure do
# Disable serving static files from the `/public` folder by default since
# Disable serving static files from the `/public` folder by default since
# Apache or NGINX already handles this.
# Apache or NGINX already handles this.
config
.
public_file_server
.
enabled
=
ENV
[
'RAILS_SERVE_STATIC_FILES'
].
present?
config
.
public_file_server
.
enabled
=
ENV
[
"RAILS_SERVE_STATIC_FILES"
].
present?
# Compress JavaScripts and CSS.
# Compress JavaScripts and CSS.
config
.
assets
.
js_compressor
=
:uglifier
config
.
assets
.
js_compressor
=
:uglifier
...
@@ -33,16 +33,16 @@ Rails.application.configure do
...
@@ -33,16 +33,16 @@ Rails.application.configure do
# `config.assets.precompile` and `config.assets.version` have moved to config/initializers/assets.rb
# `config.assets.precompile` and `config.assets.version` have moved to config/initializers/assets.rb
# Enable serving of images, stylesheets, and JavaScripts from an asset server.
# Enable serving of images, stylesheets, and JavaScripts from an asset server.
# config.action_controller.asset_host =
'http://assets.example.com'
# config.action_controller.asset_host =
"http://assets.example.com"
# Specifies the header that your server uses for sending files.
# Specifies the header that your server uses for sending files.
# config.action_dispatch.x_sendfile_header =
'X-Sendfile'
# for Apache
# config.action_dispatch.x_sendfile_header =
"X-Sendfile"
# for Apache
# config.action_dispatch.x_sendfile_header =
'X-Accel-Redirect'
# for NGINX
# config.action_dispatch.x_sendfile_header =
"X-Accel-Redirect"
# for NGINX
# Mount Action Cable outside main process or domain
# Mount Action Cable outside main process or domain
# config.action_cable.mount_path = nil
# config.action_cable.mount_path = nil
# config.action_cable.url =
'wss://example.com/cable'
# config.action_cable.url =
"wss://example.com/cable"
# config.action_cable.allowed_request_origins = [
'http://example.com'
, /http:\/\/example.*/ ]
# config.action_cable.allowed_request_origins = [
"http://example.com"
, /http:\/\/example.*/ ]
# Force all access to the app over SSL, use Strict-Transport-Security, and use secure cookies.
# Force all access to the app over SSL, use Strict-Transport-Security, and use secure cookies.
# config.force_ssl = true
# config.force_ssl = true
...
@@ -77,8 +77,8 @@ Rails.application.configure do
...
@@ -77,8 +77,8 @@ Rails.application.configure do
config
.
log_formatter
=
::
Logger
::
Formatter
.
new
config
.
log_formatter
=
::
Logger
::
Formatter
.
new
# Use a different logger for distributed setups.
# Use a different logger for distributed setups.
# require
'syslog/logger'
# require
"syslog/logger"
# config.logger = ActiveSupport::TaggedLogging.new(Syslog::Logger.new
'app-name'
)
# config.logger = ActiveSupport::TaggedLogging.new(Syslog::Logger.new
"app-name"
)
if
ENV
[
"RAILS_LOG_TO_STDOUT"
].
present?
if
ENV
[
"RAILS_LOG_TO_STDOUT"
].
present?
logger
=
ActiveSupport
::
Logger
.
new
(
STDOUT
)
logger
=
ActiveSupport
::
Logger
.
new
(
STDOUT
)
...
...
config/routes.rb
View file @
7684c992
Rails
.
application
.
routes
.
draw
do
Rails
.
application
.
routes
.
draw
do
get
'users/new'
get
"users/new"
root
"static_pages#home"
root
"static_pages#home"
get
"/help"
,
to:
"static_pages#help"
get
"/help"
,
to:
"static_pages#help"
get
"/about"
,
to:
"static_pages#about"
get
"/about"
,
to:
"static_pages#about"
...
...
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