Skip to content

Instantly share code, notes, and snippets.

@yahihi
Created March 6, 2013 03:26
Show Gist options
  • Save yahihi/5096475 to your computer and use it in GitHub Desktop.
Save yahihi/5096475 to your computer and use it in GitHub Desktop.
require File.expand_path('../boot', __FILE__)
require 'rails/all'
if defined?(Bundler)
# If you precompile assets before deploying to production, use this line
# production環境にデプロイする前にアセットをプリコンパイルする場合はこのラインをつかう
Bundler.require(*Rails.groups(:assets => %w(development test)))
# If you want your assets lazily compiled in production, use this line
# production環境でアセットをlazyにコンパイルする場合は、このラインをつかう
# Bundler.require(:default, :assets, Rails.env)
end
module Bootstrap
class Application < Rails::Application
# Settings in config/environments/* take precedence over those specified here.
# config/enviroments/*にある設定はここに書いたものより優先する
# Application configuration should go into files in config/initializers
# -- all .rb files in that directory are automatically loaded.
# アプリケーションの設定はconfig/initializersにあるファイルに書くべき
# このディレクトリにあるすべてのrbファイルは自動的にロードされる
# Custom directories with classes and modules you want to be autoloadable.
# 自動ロード可能にしたいクラスとモジュールを配置するカスタムディレクトリ
# config.autoload_paths += %W(#{config.root}/extras)
# Only load the plugins named here, in the order given (default is alphabetical).
# ここに書いたプラグインだけがロードされる、書いた順番に(デフォルトはアルファベット順)
# :all can be used as a placeholder for all plugins not explicitly named.
# :allをすべてのプラグインを意味するものとして使える
# config.plugins = [ :exception_notification, :ssl_requirement, :all ]
# Activate observers that should always be running.
# 常に動作するobserverを起動させる
# config.active_record.observers = :cacher, :garbage_collector, :forum_observer
# Set Time.zone default to the specified zone and make Active Record auto-convert to this zone.
# Time.zoneのデフォルトを特定の地域に設定してActive Recordにこの地域に自動変換させる
# Run "rake -D time" for a list of tasks for finding time zone names. Default is UTC.
# "rake -D time"を使えばタイムゾーン名のリストを得ることができる.デフォルトはUTC.
# config.time_zone = 'Central Time (US & Canada)'
# The default locale is :en and all translations from config/locales/*.rb,yml are auto loaded.
# デフォルトのlocaleは:en.そしてすべての翻訳はconfig/locales/*.rb,ymlが自動ロードされる
# config.i18n.load_path += Dir[Rails.root.join('my', 'locales', '*.{rb,yml}').to_s]
# config.i18n.default_locale = :de
# Configure the default encoding used in templates for Ruby 1.9.
# Ruby 1.9のテンプレートで使われるデフォルトのエンコードを設定する
config.encoding = "utf-8"
# Configure sensitive parameters which will be filtered from the log file.
# ログファイルでフィルタしたいセンシティブなパラメータを設定する
config.filter_parameters += [:password]
# Enable escaping HTML in JSON.
# JSONファイル内でHTMLをエスケープする
config.active_support.escape_html_entities_in_json = true
# Use SQL instead of Active Record's schema dumper when creating the database.
# SQLをつかう.データベースをcreateするときActiveRecordのスキーマダンパーの代わりに
# This is necessary if your schema can't be completely dumped by the schema dumper,
# これはあなたのスキーマがスキーマダンパーで完全にダンプできないときに必要
# like if you have constraints or database-specific column types
# 例えば、データベースに特異なから無タイプをつかうとき
# config.active_record.schema_format = :sql
# Enforce whitelist mode for mass assignment.
# mass assignmentのためにホワイトリストをつかう
# This will create an empty whitelist of attributes available for mass-assignment for all models
# in your app. As such, your models will need to explicitly whitelist or blacklist accessible
# parameters by using an attr_accessible or attr_protected declaration.
# これは空のホワイトリストをつくる.
# attr_accessibleやattr_protectedを使ってホワイトリストやブラックリストを特定する必要がある
config.active_record.whitelist_attributes = true
# Enable the asset pipeline
# アセットパイプラインを有効にする
config.assets.enabled = true
# Version of your assets, change this if you want to expire all your assets
# アセットのバージョン すべてのアセットを期限切れにしたいときに変える
config.assets.version = '1.0'
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment