comparison config/application.rb @ 431:68eb23b52864

Rails 5 \o/
author nanaya <me@myconan.net>
date Fri, 13 May 2016 03:56:07 +0900
parents 851432f21603
children d31fe32da7a0
comparison
equal deleted inserted replaced
430:6257da6e1aa1 431:68eb23b52864
1 require File.expand_path("../boot", __FILE__) 1 require_relative "boot"
2 2
3 # To allow setting environment variable ZP_DATABASE_URL instead of DATABASE_URL. 3 # To allow setting environment variable ZP_DATABASE_URL instead of DATABASE_URL.
4 ENV["DATABASE_URL"] = ENV["ZP_DATABASE_URL"] if ENV["ZP_DATABASE_URL"] 4 ENV["DATABASE_URL"] = ENV["ZP_DATABASE_URL"] if ENV["ZP_DATABASE_URL"]
5 5
6 require "active_record/railtie" 6 require "active_record/railtie"
8 # require "action_mailer/railtie" 8 # require "action_mailer/railtie"
9 # require "active_resource/railtie" 9 # require "active_resource/railtie"
10 require "sprockets/railtie" 10 require "sprockets/railtie"
11 require "rails/test_unit/railtie" 11 require "rails/test_unit/railtie"
12 12
13 require File.expand_path("../init_config", __FILE__) 13 require_relative "init_config"
14 suppress(LoadError) { require File.expand_path("../local_config", __FILE__) } 14 suppress(LoadError) { require_relative "local_config" }
15 require File.expand_path("../default_config", __FILE__) 15 require_relative "default_config"
16 16
17 # Pick the frameworks you want: 17 # If you precompile assets before deploying to production, use this line
18 if defined?(Bundler) 18 Bundler.require(*CONFIG["bundler_groups"])
19 # If you precompile assets before deploying to production, use this line 19 # If you want your assets lazily compiled in production, use this line
20 Bundler.require(*CONFIG["bundler_groups"]) 20 # Bundler.require(:default, :assets, Rails.env)
21 # If you want your assets lazily compiled in production, use this line
22 # Bundler.require(:default, :assets, Rails.env)
23 end
24 21
25 module Zeropaste 22 module Zeropaste
26 class Application < Rails::Application 23 class Application < Rails::Application
27 # Settings in config/environments/* take precedence over those specified here. 24 # Settings in config/environments/* take precedence over those specified here.
28 # Application configuration should go into files in config/initializers 25 # Application configuration should go into files in config/initializers
47 # config.i18n.default_locale = :de 44 # config.i18n.default_locale = :de
48 45
49 # Configure the default encoding used in templates for Ruby 1.9. 46 # Configure the default encoding used in templates for Ruby 1.9.
50 config.encoding = "utf-8" 47 config.encoding = "utf-8"
51 48
52 # Configure sensitive parameters which will be filtered from the log file.
53 config.filter_parameters += [:password]
54
55 # Enable escaping HTML in JSON. 49 # Enable escaping HTML in JSON.
56 config.active_support.escape_html_entities_in_json = true 50 config.active_support.escape_html_entities_in_json = true
57 51
58 # Use SQL instead of Active Record's schema dumper when creating the database. 52 # Use SQL instead of Active Record's schema dumper when creating the database.
59 # This is necessary if your schema can't be completely dumped by the schema dumper, 53 # This is necessary if your schema can't be completely dumped by the schema dumper,
61 # config.active_record.schema_format = :sql 55 # config.active_record.schema_format = :sql
62 56
63 # Enable the asset pipeline 57 # Enable the asset pipeline
64 config.assets.enabled = true 58 config.assets.enabled = true
65 59
66 # Version of your assets, change this if you want to expire all your assets
67 config.assets.version = "1.0"
68
69 # No need to initialize application when precompiling assets 60 # No need to initialize application when precompiling assets
70 config.assets.initialize_on_precompile = false 61 config.assets.initialize_on_precompile = false
71 62
72 config.action_view.field_error_proc = proc { |html| html } 63 config.action_view.field_error_proc = proc { |html| html }
73 end 64 end