Skip to content

Commit

Permalink
basic rails structure, fix format with rufo
Browse files Browse the repository at this point in the history
  • Loading branch information
Ifiht committed Dec 20, 2023
1 parent b185dc7 commit 8f52510
Show file tree
Hide file tree
Showing 6 changed files with 11 additions and 28 deletions.
28 changes: 5 additions & 23 deletions webview/README.md
Original file line number Diff line number Diff line change
@@ -1,24 +1,6 @@
# README
# Ruby on Rails Help:

This README would normally document whatever steps are necessary to get the
application up and running.

Things you may want to cover:

* Ruby version

* System dependencies

* Configuration

* Database creation

* Database initialization

* How to run the test suite

* Services (job queues, cache servers, search engines, etc.)

* Deployment instructions

* ...
### Generate a Controller
`rails generate controller <controller_name> [<view_name>]`
Undo with:
`rails destroy controller <controller_name>`
2 changes: 1 addition & 1 deletion webview/config/environments/development.rb
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@

config.cache_store = :memory_store
config.public_file_server.headers = {
"Cache-Control" => "public, max-age=#{2.days.to_i}"
"Cache-Control" => "public, max-age=#{2.days.to_i}",
}
else
config.action_controller.perform_caching = false
Expand Down
4 changes: 2 additions & 2 deletions webview/config/environments/production.rb
Original file line number Diff line number Diff line change
Expand Up @@ -53,11 +53,11 @@

# Log to STDOUT by default
config.logger = ActiveSupport::Logger.new(STDOUT)
.tap { |logger| logger.formatter = ::Logger::Formatter.new }
.tap { |logger| logger.formatter = ::Logger::Formatter.new }
.then { |logger| ActiveSupport::TaggedLogging.new(logger) }

# Prepend all log lines with the following tags.
config.log_tags = [ :request_id ]
config.log_tags = [:request_id]

# Info include generic and useful information about system operation, but avoids logging too much
# information to avoid inadvertent exposure of personally identifiable information (PII). If you
Expand Down
2 changes: 1 addition & 1 deletion webview/config/environments/test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
# Configure public file server for tests with Cache-Control for performance.
config.public_file_server.enabled = true
config.public_file_server.headers = {
"Cache-Control" => "public, max-age=#{1.hour.to_i}"
"Cache-Control" => "public, max-age=#{1.hour.to_i}",
}

# Show full error reports and disable caching.
Expand Down
2 changes: 1 addition & 1 deletion webview/config/initializers/filter_parameter_logging.rb
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,5 @@
# Use this to limit dissemination of sensitive information.
# See the ActiveSupport::ParameterFilter documentation for supported notations and behaviors.
Rails.application.config.filter_parameters += [
:passw, :secret, :token, :_key, :crypt, :salt, :certificate, :otp, :ssn
:passw, :secret, :token, :_key, :crypt, :salt, :certificate, :otp, :ssn,
]
1 change: 1 addition & 0 deletions webview/config/routes.rb
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
Rails.application.routes.draw do
get "files/ls", to: "files#ls"
# Define your application routes per the DSL in https://guides.rubyonrails.org/routing.html

# Reveal health status on /up that returns 200 if the app boots with no exceptions, otherwise 500.
Expand Down

0 comments on commit 8f52510

Please sign in to comment.