subdivision_select 0.0.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (113) hide show
  1. checksums.yaml +7 -0
  2. data/MIT-LICENSE +20 -0
  3. data/Rakefile +24 -0
  4. data/app/assets/javascripts/subdivision_select.js +68 -0
  5. data/app/assets/stylesheets/subdivision_select/application.css +15 -0
  6. data/app/controllers/subdivision_select/subdivisions_controller.rb +7 -0
  7. data/app/helpers/subdivision_select/subdivisions_helper.rb +20 -0
  8. data/config/routes.rb +3 -0
  9. data/lib/subdivision_select.rb +4 -0
  10. data/lib/subdivision_select/engine.rb +21 -0
  11. data/lib/subdivision_select/subdivision_select_helper.rb +32 -0
  12. data/lib/subdivision_select/version.rb +3 -0
  13. data/lib/tasks/subdivision_select_tasks.rake +4 -0
  14. data/spec/controllers/subdivision_select/subdivisions_controller_spec.rb +22 -0
  15. data/spec/helpers/subdivision_select/subdivisions_helper_spec.rb +27 -0
  16. data/spec/rails_helper.rb +53 -0
  17. data/spec/spec_helper.rb +84 -0
  18. data/spec/test_app/README.rdoc +28 -0
  19. data/spec/test_app/Rakefile +7 -0
  20. data/spec/test_app/app/assets/javascripts/application.js +15 -0
  21. data/spec/test_app/app/assets/stylesheets/addresses_demo.css +30 -0
  22. data/spec/test_app/app/assets/stylesheets/application.css +15 -0
  23. data/spec/test_app/app/controllers/addresses_demo_controller.rb +7 -0
  24. data/spec/test_app/app/controllers/application_controller.rb +5 -0
  25. data/spec/test_app/app/helpers/application_helper.rb +2 -0
  26. data/spec/test_app/app/views/addresses_demo/_form.html.erb +28 -0
  27. data/spec/test_app/app/views/addresses_demo/index.html.erb +32 -0
  28. data/spec/test_app/app/views/layouts/application.html.erb +16 -0
  29. data/spec/test_app/bin/bundle +3 -0
  30. data/spec/test_app/bin/rails +4 -0
  31. data/spec/test_app/bin/rake +4 -0
  32. data/spec/test_app/bin/setup +29 -0
  33. data/spec/test_app/config.ru +4 -0
  34. data/spec/test_app/config/application.rb +38 -0
  35. data/spec/test_app/config/boot.rb +5 -0
  36. data/spec/test_app/config/database.yml +25 -0
  37. data/spec/test_app/config/environment.rb +5 -0
  38. data/spec/test_app/config/environments/development.rb +42 -0
  39. data/spec/test_app/config/environments/production.rb +83 -0
  40. data/spec/test_app/config/environments/test.rb +43 -0
  41. data/spec/test_app/config/initializers/assets.rb +12 -0
  42. data/spec/test_app/config/initializers/backtrace_silencers.rb +9 -0
  43. data/spec/test_app/config/initializers/cookies_serializer.rb +3 -0
  44. data/spec/test_app/config/initializers/filter_parameter_logging.rb +4 -0
  45. data/spec/test_app/config/initializers/inflections.rb +16 -0
  46. data/spec/test_app/config/initializers/mime_types.rb +4 -0
  47. data/spec/test_app/config/initializers/session_store.rb +3 -0
  48. data/spec/test_app/config/initializers/wrap_parameters.rb +15 -0
  49. data/spec/test_app/config/locales/en.yml +23 -0
  50. data/spec/test_app/config/routes.rb +7 -0
  51. data/spec/test_app/config/secrets.yml +22 -0
  52. data/spec/test_app/db/development.sqlite3 +0 -0
  53. data/spec/test_app/db/schema.rb +17 -0
  54. data/spec/test_app/db/test.sqlite3 +0 -0
  55. data/spec/test_app/log/development.log +15256 -0
  56. data/spec/test_app/log/test.log +3590 -0
  57. data/spec/test_app/public/404.html +67 -0
  58. data/spec/test_app/public/422.html +67 -0
  59. data/spec/test_app/public/500.html +66 -0
  60. data/spec/test_app/public/favicon.ico +0 -0
  61. data/spec/test_app/spec/controllers/addresses_demo_controller_spec.rb +10 -0
  62. data/spec/test_app/spec/features/select_boxes_spec.rb +59 -0
  63. data/spec/test_app/tmp/cache/assets/development/sprockets/0e86e92aa1a7fa502550f682d1eff538 +0 -0
  64. data/spec/test_app/tmp/cache/assets/development/sprockets/13fe41fee1fe35b49d145bcc06610705 +0 -0
  65. data/spec/test_app/tmp/cache/assets/development/sprockets/2f5173deea6c795b8fdde723bb4b63af +0 -0
  66. data/spec/test_app/tmp/cache/assets/development/sprockets/3262e90c302e3e34c98b57cb15a5b27d +0 -0
  67. data/spec/test_app/tmp/cache/assets/development/sprockets/357970feca3ac29060c1e3861e2c0953 +0 -0
  68. data/spec/test_app/tmp/cache/assets/development/sprockets/40f61c50b6d6c35efefea3238e00b207 +0 -0
  69. data/spec/test_app/tmp/cache/assets/development/sprockets/4fecaadc92042e3205c672f79acd3d53 +0 -0
  70. data/spec/test_app/tmp/cache/assets/development/sprockets/5342836c5888a5ebf28e2de221e5253f +0 -0
  71. data/spec/test_app/tmp/cache/assets/development/sprockets/670fbdb8a72ec9ac99a781d7d22b3f4d +0 -0
  72. data/spec/test_app/tmp/cache/assets/development/sprockets/80bc23cc99868eb749d85729de1d581c +0 -0
  73. data/spec/test_app/tmp/cache/assets/development/sprockets/85ceb80957448de1ad16090a43790597 +0 -0
  74. data/spec/test_app/tmp/cache/assets/development/sprockets/86ba36fa1967df4fe7a5fdd85d944f8b +0 -0
  75. data/spec/test_app/tmp/cache/assets/development/sprockets/a71eee989fdb18229089d8186762b57a +0 -0
  76. data/spec/test_app/tmp/cache/assets/development/sprockets/a91867dcc3218be71a70e7659d113e33 +0 -0
  77. data/spec/test_app/tmp/cache/assets/development/sprockets/aa8c7ed1b6c24feb5236df8f536b0376 +0 -0
  78. data/spec/test_app/tmp/cache/assets/development/sprockets/b50a9d45908f02319edc45b04faccf30 +0 -0
  79. data/spec/test_app/tmp/cache/assets/development/sprockets/b79233589329a96b0de414e6bef4e6e6 +0 -0
  80. data/spec/test_app/tmp/cache/assets/development/sprockets/cffd775d018f68ce5dba1ee0d951a994 +0 -0
  81. data/spec/test_app/tmp/cache/assets/development/sprockets/d771ace226fc8215a3572e0aa35bb0d6 +0 -0
  82. data/spec/test_app/tmp/cache/assets/development/sprockets/e21efccbec07dbc2c25554b5a116ca7e +0 -0
  83. data/spec/test_app/tmp/cache/assets/development/sprockets/f7cbd26ba1d28d48de824f0e94586655 +0 -0
  84. data/spec/test_app/tmp/cache/assets/test/sprockets/13fe41fee1fe35b49d145bcc06610705 +0 -0
  85. data/spec/test_app/tmp/cache/assets/test/sprockets/2f5173deea6c795b8fdde723bb4b63af +0 -0
  86. data/spec/test_app/tmp/cache/assets/test/sprockets/3262e90c302e3e34c98b57cb15a5b27d +0 -0
  87. data/spec/test_app/tmp/cache/assets/test/sprockets/357970feca3ac29060c1e3861e2c0953 +0 -0
  88. data/spec/test_app/tmp/cache/assets/test/sprockets/40f61c50b6d6c35efefea3238e00b207 +0 -0
  89. data/spec/test_app/tmp/cache/assets/test/sprockets/670fbdb8a72ec9ac99a781d7d22b3f4d +0 -0
  90. data/spec/test_app/tmp/cache/assets/test/sprockets/80bc23cc99868eb749d85729de1d581c +0 -0
  91. data/spec/test_app/tmp/cache/assets/test/sprockets/a71eee989fdb18229089d8186762b57a +0 -0
  92. data/spec/test_app/tmp/cache/assets/test/sprockets/aa8c7ed1b6c24feb5236df8f536b0376 +0 -0
  93. data/spec/test_app/tmp/cache/assets/test/sprockets/cffd775d018f68ce5dba1ee0d951a994 +0 -0
  94. data/spec/test_app/tmp/cache/assets/test/sprockets/d771ace226fc8215a3572e0aa35bb0d6 +0 -0
  95. data/spec/test_app/tmp/cache/assets/test/sprockets/f7cbd26ba1d28d48de824f0e94586655 +0 -0
  96. data/spec/test_app/tmp/capybara/capybara-201504291131209825278815.html +574 -0
  97. data/spec/test_app/tmp/capybara/capybara-201504291150401230302205.html +574 -0
  98. data/spec/test_app/tmp/capybara/capybara-201504291206543623839131.html +574 -0
  99. data/spec/test_app/tmp/capybara/capybara-20150429120937203197592.html +574 -0
  100. data/spec/test_app/tmp/capybara/capybara-201504291210383988435864.html +574 -0
  101. data/spec/test_app/tmp/capybara/capybara-20150429121627707334270.html +574 -0
  102. data/spec/test_app/tmp/capybara/capybara-201504291236506064013706.html +574 -0
  103. data/spec/test_app/tmp/capybara/capybara-201504291319426841751741.html +574 -0
  104. data/spec/test_app/tmp/capybara/capybara-201504291320577316381446.html +282 -0
  105. data/spec/test_app/tmp/capybara/capybara-201504291324064605129112.html +282 -0
  106. data/spec/test_app/tmp/capybara/capybara-201504291325214676808281.html +282 -0
  107. data/spec/test_app/tmp/capybara/capybara-201504291329305133892137.html +282 -0
  108. data/spec/test_app/tmp/capybara/capybara-201504291331505222229998.html +282 -0
  109. data/spec/test_app/tmp/capybara/capybara-201504291342298940226392.html +282 -0
  110. data/spec/test_app/tmp/capybara/capybara-201504291343237421868398.html +282 -0
  111. data/spec/test_app/tmp/capybara/capybara-201504291344199401915203.html +282 -0
  112. data/spec/test_app/tmp/pids/server.pid +1 -0
  113. metadata +366 -0
@@ -0,0 +1,28 @@
1
+ == README
2
+
3
+ This README would normally document whatever steps are necessary to get the
4
+ application up and running.
5
+
6
+ Things you may want to cover:
7
+
8
+ * Ruby version
9
+
10
+ * System dependencies
11
+
12
+ * Configuration
13
+
14
+ * Database creation
15
+
16
+ * Database initialization
17
+
18
+ * How to run the test suite
19
+
20
+ * Services (job queues, cache servers, search engines, etc.)
21
+
22
+ * Deployment instructions
23
+
24
+ * ...
25
+
26
+
27
+ Please feel free to use a different markup language if you do not plan to run
28
+ <tt>rake doc:app</tt>.
@@ -0,0 +1,7 @@
1
+ # Add your own tasks in files placed in lib/tasks ending in .rake,
2
+ # for example lib/tasks/capistrano.rake, and they will automatically
3
+ # be available to Rake.
4
+
5
+ require File.expand_path("../config/application", __FILE__)
6
+
7
+ Rails.application.load_tasks
@@ -0,0 +1,15 @@
1
+ // This is a manifest file that'll be compiled into application.js, which will include all the files
2
+ // listed below.
3
+ //
4
+ // Any JavaScript/Coffee file within this directory, lib/assets/javascripts, vendor/assets/javascripts,
5
+ // or any plugin's vendor/assets/javascripts directory can be referenced here using a relative path.
6
+ //
7
+ // It's not advisable to add code directly here, but if you do, it'll appear at the bottom of the
8
+ // compiled file.
9
+ //
10
+ // Read Sprockets README (https://github.com/sstephenson/sprockets#sprockets-directives) for details
11
+ // about supported directives.
12
+ //
13
+ //= require_tree .
14
+ //= require jquery
15
+ //= require subdivision_select
@@ -0,0 +1,30 @@
1
+ body,
2
+ select {
3
+ font-size: 20px;
4
+ }
5
+
6
+ .container {
7
+ width: 100%;
8
+ max-width: 500px;
9
+ margin: 0 auto;
10
+ }
11
+
12
+ h1 {
13
+ text-align: center;
14
+ }
15
+
16
+ form {
17
+ border-radius: 0.25em;
18
+ background: #eee;
19
+ padding: 0.5em;
20
+ margin: 2em 0;
21
+ }
22
+
23
+
24
+ select {
25
+ max-width: 100%;
26
+ }
27
+
28
+ .field {
29
+ margin: 1em 0;
30
+ }
@@ -0,0 +1,15 @@
1
+ /*
2
+ * This is a manifest file that'll be compiled into application.css, which will include all the files
3
+ * listed below.
4
+ *
5
+ * Any CSS and SCSS file within this directory, lib/assets/stylesheets, vendor/assets/stylesheets,
6
+ * or any plugin's vendor/assets/stylesheets directory can be referenced here using a relative path.
7
+ *
8
+ * You're free to add application-wide styles to this file and they'll appear at the bottom of the
9
+ * compiled file so the styles you add here take precedence over styles defined in any styles
10
+ * defined in the other CSS/SCSS files in this directory. It is generally better to create a new
11
+ * file per style scope.
12
+ *
13
+ *= require_tree .
14
+ *= require_self
15
+ */
@@ -0,0 +1,7 @@
1
+ # Not auto loaded because we don't have a Gemfile for a test_app
2
+ require "country_select"
3
+
4
+ class AddressesDemoController < ApplicationController
5
+ def index
6
+ end
7
+ end
@@ -0,0 +1,5 @@
1
+ class ApplicationController < ActionController::Base
2
+ # Prevent CSRF attacks by raising an exception.
3
+ # For APIs, you may want to use :null_session instead.
4
+ protect_from_forgery with: :exception
5
+ end
@@ -0,0 +1,2 @@
1
+ module ApplicationHelper
2
+ end
@@ -0,0 +1,28 @@
1
+ <%#
2
+ This partial takes 1-5 local variables
3
+ - name
4
+ - note (optional)
5
+ - country_options (optional)
6
+ - subdivision_options (optional)
7
+ %>
8
+
9
+ <%
10
+ note ||= ""
11
+ country_options ||= {}
12
+ subdivision_options ||= {}
13
+ %>
14
+
15
+ <%= form_for("#{name.parameterize}_address") do |f| %>
16
+ <h2> <%= name %> </h2>
17
+ <h4> <%= note %> </h4>
18
+
19
+ <div class="field">
20
+ <%= f.label(:country) %><br />
21
+ <%= f.country_select(:country, country_options) %>
22
+ </div>
23
+
24
+ <div class="field">
25
+ <%= f.label(:subdivision, "State / Province") %><br />
26
+ <%= f.subdivision_select(:subdivision, country_options[:selected], subdivision_options) %>
27
+ </div>
28
+ <% end %>
@@ -0,0 +1,32 @@
1
+ <h1>Addresses Demo</h1>
2
+
3
+ <%=
4
+ render(
5
+ partial: "form",
6
+ locals: {
7
+ name: "Basic",
8
+ country_options: { include_blank: true }
9
+ }
10
+ )
11
+ %>
12
+
13
+ <%=
14
+ render(
15
+ partial: "form",
16
+ locals: {
17
+ name: "Prepopulated for Ireland",
18
+ country_options: { selected: "IE" }
19
+ }
20
+ )
21
+ %>
22
+
23
+ <%=
24
+ render(
25
+ partial: "form",
26
+ locals: {
27
+ name: "Prepopulated for Ireland (Include Blank)",
28
+ country_options: { selected: "IE" },
29
+ subdivision_options: {include_blank: true}
30
+ }
31
+ )
32
+ %>
@@ -0,0 +1,16 @@
1
+ <!DOCTYPE html>
2
+ <html>
3
+ <head>
4
+ <title>Subdivision Select - TestApp</title>
5
+ <%= stylesheet_link_tag 'application', media: 'all', 'data-turbolinks-track' => true %>
6
+ <%= javascript_include_tag 'application', 'data-turbolinks-track' => true %>
7
+ <%= csrf_meta_tags %>
8
+ </head>
9
+ <body>
10
+
11
+ <div class="container">
12
+ <%= yield %>
13
+ </div>
14
+
15
+ </body>
16
+ </html>
@@ -0,0 +1,3 @@
1
+ #!/usr/bin/env ruby
2
+ ENV["BUNDLE_GEMFILE"] ||= File.expand_path("../../Gemfile", __FILE__)
3
+ load Gem.bin_path("bundler", "bundle")
@@ -0,0 +1,4 @@
1
+ #!/usr/bin/env ruby
2
+ APP_PATH = File.expand_path("../../config/application", __FILE__)
3
+ require_relative "../config/boot"
4
+ require "rails/commands"
@@ -0,0 +1,4 @@
1
+ #!/usr/bin/env ruby
2
+ require_relative "../config/boot"
3
+ require "rake"
4
+ Rake.application.run
@@ -0,0 +1,29 @@
1
+ #!/usr/bin/env ruby
2
+ require "pathname"
3
+
4
+ # path to your application root.
5
+ APP_ROOT = Pathname.new File.expand_path("../../", __FILE__)
6
+
7
+ Dir.chdir APP_ROOT do
8
+ # This script is a starting point to setup your application.
9
+ # Add necessary setup steps to this file:
10
+
11
+ puts "== Installing dependencies =="
12
+ system "gem install bundler --conservative"
13
+ system "bundle check || bundle install"
14
+
15
+ # puts "\n== Copying sample files =="
16
+ # unless File.exist?("config/database.yml")
17
+ # system "cp config/database.yml.sample config/database.yml"
18
+ # end
19
+
20
+ puts "\n== Preparing database =="
21
+ system "bin/rake db:setup"
22
+
23
+ puts "\n== Removing old logs and tempfiles =="
24
+ system "rm -f log/*"
25
+ system "rm -rf tmp/cache"
26
+
27
+ puts "\n== Restarting application server =="
28
+ system "touch tmp/restart.txt"
29
+ end
@@ -0,0 +1,4 @@
1
+ # This file is used by Rack-based servers to start the application.
2
+
3
+ require ::File.expand_path('../config/environment', __FILE__)
4
+ run Rails.application
@@ -0,0 +1,38 @@
1
+ require File.expand_path("../boot", __FILE__)
2
+
3
+ # Pick the frameworks you want:
4
+ require "active_record/railtie"
5
+ require "action_controller/railtie"
6
+ require "action_mailer/railtie"
7
+ require "action_view/railtie"
8
+ require "sprockets/railtie"
9
+ # require "rails/test_unit/railtie"
10
+
11
+ Bundler.require(*Rails.groups)
12
+ require "subdivision_select"
13
+
14
+ module TestApp
15
+ class Application < Rails::Application
16
+ # Settings in config/environments/* take precedence
17
+ # over those specified here.
18
+ # Application configuration should go into files in config/initializers
19
+ # -- all .rb files in that directory are automatically loaded.
20
+
21
+ # Set Time.zone default to the specified zone and
22
+ # make Active Record auto-convert to this zone.
23
+ # Run "rake -D time" for a list of tasks for finding time zone names.
24
+ # Default is UTC.
25
+ # config.time_zone = 'Central Time (US & Canada)'
26
+
27
+ # The default locale is :en and all translations from
28
+ # config/locales/*.rb,yml are auto loaded.
29
+ # config.i18n.load_path += Dir[
30
+ # Rails.root.join('my', 'locales', '*.{rb,yml}').to_s
31
+ # ]
32
+ # config.i18n.default_locale = :de
33
+
34
+ # Do not swallow errors in after_commit/after_rollback callbacks.
35
+ # Only for Rails 4.2
36
+ # config.active_record.raise_in_transactional_callbacks = true
37
+ end
38
+ end
@@ -0,0 +1,5 @@
1
+ # Set up gems listed in the Gemfile.
2
+ ENV["BUNDLE_GEMFILE"] ||= File.expand_path("../../../../Gemfile", __FILE__)
3
+
4
+ require "bundler/setup" if File.exist?(ENV["BUNDLE_GEMFILE"])
5
+ $LOAD_PATH.unshift File.expand_path("../../../../lib", __FILE__)
@@ -0,0 +1,25 @@
1
+ # SQLite version 3.x
2
+ # gem install sqlite3
3
+ #
4
+ # Ensure the SQLite 3 gem is defined in your Gemfile
5
+ # gem 'sqlite3'
6
+ #
7
+ default: &default
8
+ adapter: sqlite3
9
+ pool: 5
10
+ timeout: 5000
11
+
12
+ development:
13
+ <<: *default
14
+ database: db/development.sqlite3
15
+
16
+ # Warning: The database defined as "test" will be erased and
17
+ # re-generated from your development database when you run "rake".
18
+ # Do not set this db to the same as development or production.
19
+ test:
20
+ <<: *default
21
+ database: db/test.sqlite3
22
+
23
+ production:
24
+ <<: *default
25
+ database: db/production.sqlite3
@@ -0,0 +1,5 @@
1
+ # Load the Rails application.
2
+ require File.expand_path("../application", __FILE__)
3
+
4
+ # Initialize the Rails application.
5
+ Rails.application.initialize!
@@ -0,0 +1,42 @@
1
+ Rails.application.configure do
2
+ # Settings specified here will take precedence
3
+ # over those in config/application.rb.
4
+
5
+ # In the development environment your application's code is reloaded on
6
+ # every request. This slows down response time but is perfect for development
7
+ # since you don't have to restart the web server when you make code changes.
8
+ config.cache_classes = false
9
+
10
+ # Do not eager load code on boot.
11
+ config.eager_load = false
12
+
13
+ # Show full error reports and disable caching.
14
+ config.consider_all_requests_local = true
15
+ config.action_controller.perform_caching = false
16
+
17
+ # Don't care if the mailer can't send.
18
+ config.action_mailer.raise_delivery_errors = false
19
+
20
+ # Print deprecation notices to the Rails logger.
21
+ config.active_support.deprecation = :log
22
+
23
+ # Raise an error on page load if there are pending migrations.
24
+ config.active_record.migration_error = :page_load
25
+
26
+ # Debug mode disables concatenation and preprocessing of assets.
27
+ # This option may cause significant delays in view rendering with a large
28
+ # number of complex assets.
29
+ config.assets.debug = true
30
+
31
+ # Asset digests allow you to set far-future HTTP expiration dates on all
32
+ # assets, yet still be able to expire them through the digest params.
33
+ config.assets.digest = true
34
+
35
+ # Adds additional error checking when serving assets at runtime.
36
+ # Checks for improperly declared sprockets dependencies.
37
+ # Raises helpful error messages.
38
+ config.assets.raise_runtime_errors = true
39
+
40
+ # Raises error for missing translations
41
+ # config.action_view.raise_on_missing_translations = true
42
+ end
@@ -0,0 +1,83 @@
1
+ Rails.application.configure do
2
+ # Settings specified here will take precedence
3
+ # over those in config/application.rb.
4
+
5
+ # Code is not reloaded between requests.
6
+ config.cache_classes = true
7
+
8
+ # Eager load code on boot. This eager loads most of Rails and
9
+ # your application in memory, allowing both threaded web servers
10
+ # and those relying on copy on write to perform better.
11
+ # Rake tasks automatically ignore this option for performance.
12
+ config.eager_load = true
13
+
14
+ # Full error reports are disabled and caching is turned on.
15
+ config.consider_all_requests_local = false
16
+ config.action_controller.perform_caching = true
17
+
18
+ # Enable Rack::Cache to put a simple HTTP cache in front of your application
19
+ # Add `rack-cache` to your Gemfile before enabling this.
20
+ # For large-scale production use, consider using a caching reverse proxy like
21
+ # NGINX, varnish or squid.
22
+ # config.action_dispatch.rack_cache = true
23
+
24
+ # Disable serving static files from the `/public` folder by default since
25
+ # Apache or NGINX already handles this.
26
+ config.serve_static_files = ENV["RAILS_SERVE_STATIC_FILES"].present?
27
+
28
+ # Compress JavaScripts and CSS.
29
+ config.assets.js_compressor = :uglifier
30
+ # config.assets.css_compressor = :sass
31
+
32
+ # Do not fallback to assets pipeline if a precompiled asset is missed.
33
+ config.assets.compile = false
34
+
35
+ # Asset digests allow you to set far-future HTTP expiration dates on all
36
+ # assets, yet still be able to expire them through the digest params.
37
+ config.assets.digest = true
38
+
39
+ # `config.assets.precompile` and `config.assets.version` have moved
40
+ # to config/initializers/assets.rb
41
+
42
+ # Specifies the header that your server uses for sending files.
43
+ # config.action_dispatch.x_sendfile_header = 'X-Sendfile' # for Apache
44
+ # config.action_dispatch.x_sendfile_header = 'X-Accel-Redirect' # for NGINX
45
+
46
+ # Force all access to the app over SSL, use Strict-Transport-Security,
47
+ # and use secure cookies.
48
+ # config.force_ssl = true
49
+
50
+ # Use the lowest log level to ensure availability of diagnostic information
51
+ # when problems arise.
52
+ config.log_level = :debug
53
+
54
+ # Prepend all log lines with the following tags.
55
+ # config.log_tags = [ :subdomain, :uuid ]
56
+
57
+ # Use a different logger for distributed setups.
58
+ # config.logger = ActiveSupport::TaggedLogging.new(SyslogLogger.new)
59
+
60
+ # Use a different cache store in production.
61
+ # config.cache_store = :mem_cache_store
62
+
63
+ # Enable serving of images, stylesheets, and JavaScripts from an asset server.
64
+ # config.action_controller.asset_host = 'http://assets.example.com'
65
+
66
+ # Ignore bad email addresses and do not raise email delivery errors.
67
+ # Set this to true and configure the email server
68
+ # for immediate delivery to raise delivery errors.
69
+ # config.action_mailer.raise_delivery_errors = false
70
+
71
+ # Enable locale fallbacks for I18n (makes lookups for any locale fall back to
72
+ # the I18n.default_locale when a translation cannot be found).
73
+ config.i18n.fallbacks = true
74
+
75
+ # Send deprecation notices to registered listeners.
76
+ config.active_support.deprecation = :notify
77
+
78
+ # Use default logging formatter so that PID and timestamp are not suppressed.
79
+ config.log_formatter = ::Logger::Formatter.new
80
+
81
+ # Do not dump schema after migrations.
82
+ config.active_record.dump_schema_after_migration = false
83
+ end