ajax_pagination 0.5.0 → 0.5.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (79) hide show
  1. data/.gitignore +1 -1
  2. data/CHANGELOG.md +4 -0
  3. data/README.md +30 -3
  4. data/Rakefile +10 -0
  5. data/ajax_pagination.gemspec +1 -1
  6. data/lib/ajax_pagination/version.rb +1 -1
  7. data/lib/generators/ajax_pagination/assets_generator.rb +37 -0
  8. data/spec/R30PORT +1 -0
  9. data/spec/ajax_pagination/integration/ajaxpaginate_spec.rb +85 -75
  10. data/spec/ajax_pagination/integration/rails30_spec.rb +35 -0
  11. data/spec/rails30_app/.gitignore +8 -0
  12. data/spec/rails30_app/Gemfile +28 -0
  13. data/spec/rails30_app/Gemfile.lock +96 -0
  14. data/spec/rails30_app/Rakefile +7 -0
  15. data/spec/rails30_app/app/controllers/application_controller.rb +13 -0
  16. data/spec/rails30_app/app/controllers/changelog_controller.rb +12 -0
  17. data/spec/rails30_app/app/controllers/pages_controller.rb +28 -0
  18. data/spec/rails30_app/app/controllers/sessions_controller.rb +9 -0
  19. data/spec/rails30_app/app/helpers/application_helper.rb +2 -0
  20. data/spec/rails30_app/app/helpers/posts_helper.rb +2 -0
  21. data/spec/rails30_app/app/mailers/.gitkeep +0 -0
  22. data/spec/rails30_app/app/models/.gitkeep +0 -0
  23. data/spec/rails30_app/app/models/changelog.rb +19 -0
  24. data/spec/rails30_app/app/views/changelog/_page.html.erb +10 -0
  25. data/spec/rails30_app/app/views/changelog/index.html.erb +3 -0
  26. data/spec/rails30_app/app/views/layouts/ajax.html.erb +8 -0
  27. data/spec/rails30_app/app/views/layouts/application.html.erb +49 -0
  28. data/spec/rails30_app/app/views/layouts/flash.html.erb +7 -0
  29. data/spec/rails30_app/app/views/pages/about.html.erb +4 -0
  30. data/spec/rails30_app/app/views/pages/readme.html.erb +4 -0
  31. data/spec/rails30_app/app/views/pages/warnings.html.erb +43 -0
  32. data/spec/rails30_app/app/views/pages/welcome.html.erb +6 -0
  33. data/spec/rails30_app/app/views/sessions/count.html.erb +7 -0
  34. data/spec/rails30_app/config.ru +4 -0
  35. data/spec/rails30_app/config/application.rb +53 -0
  36. data/spec/rails30_app/config/boot.rb +10 -0
  37. data/spec/rails30_app/config/database.yml +25 -0
  38. data/spec/rails30_app/config/environment.rb +6 -0
  39. data/spec/rails30_app/config/environments/development.rb +25 -0
  40. data/spec/rails30_app/config/environments/production.rb +43 -0
  41. data/spec/rails30_app/config/environments/test.rb +30 -0
  42. data/spec/rails30_app/config/initializers/ajax_pagination.rb +12 -0
  43. data/spec/rails30_app/config/initializers/backtrace_silencers.rb +7 -0
  44. data/spec/rails30_app/config/initializers/inflections.rb +15 -0
  45. data/spec/rails30_app/config/initializers/mime_types.rb +5 -0
  46. data/spec/rails30_app/config/initializers/secret_token.rb +7 -0
  47. data/spec/rails30_app/config/initializers/session_store.rb +8 -0
  48. data/spec/rails30_app/config/locales/en.yml +5 -0
  49. data/spec/rails30_app/config/routes.rb +71 -0
  50. data/spec/rails30_app/log/.gitkeep +0 -0
  51. data/spec/rails30_app/public/404.html +26 -0
  52. data/spec/rails30_app/public/422.html +26 -0
  53. data/spec/rails30_app/public/500.html +25 -0
  54. data/spec/rails30_app/public/favicon.ico +0 -0
  55. data/spec/rails30_app/public/images/ajax-loader.gif +0 -0
  56. data/spec/rails30_app/public/javascripts/ajax_pagination.js +380 -0
  57. data/spec/rails30_app/public/javascripts/history.js +4 -0
  58. data/spec/rails30_app/public/javascripts/history_adapter_jquery.js +77 -0
  59. data/spec/rails30_app/public/javascripts/history_core.js +1943 -0
  60. data/spec/rails30_app/public/javascripts/history_html4.js +621 -0
  61. data/spec/rails30_app/public/javascripts/jquery-ui.js +11767 -0
  62. data/spec/rails30_app/public/javascripts/jquery-ui.min.js +791 -0
  63. data/spec/rails30_app/public/javascripts/jquery.ba-bbq.js +18 -0
  64. data/spec/rails30_app/public/javascripts/jquery.js +9266 -0
  65. data/spec/rails30_app/public/javascripts/jquery.min.js +4 -0
  66. data/spec/rails30_app/public/javascripts/jquery.url.js +160 -0
  67. data/spec/rails30_app/public/javascripts/jquery_ujs.js +373 -0
  68. data/spec/rails30_app/public/javascripts/json2.js +487 -0
  69. data/spec/rails30_app/public/stylesheets/ajax_pagination.css +24 -0
  70. data/spec/rails30_app/public/stylesheets/application.css +12 -0
  71. data/spec/rails30_app/public/stylesheets/scaffold.css +56 -0
  72. data/spec/rails30_app/script/rails +6 -0
  73. data/spec/rails_app/Gemfile.lock +107 -0
  74. data/spec/spec_helper.rb +16 -1
  75. metadata +72 -10
  76. data/spec/rails_app/test/fixtures/posts.yml +0 -9
  77. data/spec/rails_app/test/functional/posts_controller_test.rb +0 -49
  78. data/spec/rails_app/test/unit/helpers/posts_helper_test.rb +0 -4
  79. data/spec/rails_app/test/unit/post_test.rb +0 -7
@@ -0,0 +1,7 @@
1
+ #!/usr/bin/env rake
2
+ # Add your own tasks in files placed in lib/tasks ending in .rake,
3
+ # for example lib/tasks/capistrano.rake, and they will automatically be available to Rake.
4
+
5
+ require File.expand_path('../config/application', __FILE__)
6
+
7
+ RailsApp::Application.load_tasks
@@ -0,0 +1,13 @@
1
+ class ApplicationController < ActionController::Base
2
+ protect_from_forgery
3
+ before_filter :slowajaxload
4
+ ajax_respond :pagination => "", :render => { :layout => "ajax" }
5
+ def slowajaxload
6
+ if (request.GET[:pagination] || params[:pagination]) && Rails.env == "test"
7
+ delay = 0
8
+ delay = ENV['AJAX_DELAY'] if ENV['AJAX_DELAY']
9
+ sleep(delay.to_f)
10
+ end
11
+ end
12
+
13
+ end
@@ -0,0 +1,12 @@
1
+ class ChangelogController < ApplicationController
2
+ # GET /posts
3
+ # GET /posts.json
4
+ def index
5
+ @changelogs = Changelog.paginate(:page => params[:page], :per_page => 2)
6
+
7
+ respond_to do |format|
8
+ format.html # index.html.erb
9
+ ajax_respond(format)
10
+ end
11
+ end
12
+ end
@@ -0,0 +1,28 @@
1
+ class PagesController < ApplicationController
2
+ respond_to :html, :js, :only => :about
3
+
4
+ def readme
5
+ @readme = IO.read(File.expand_path("../../../../../README.md",__FILE__))
6
+ respond_to do |format|
7
+ format.html
8
+ ajax_respond format, :pagination => "", :render => {:file => "pages/readme", :layout => "ajax"}
9
+ end
10
+ end
11
+
12
+ def about
13
+ end
14
+
15
+ def welcome
16
+ respond_to do |format|
17
+ format.html
18
+ ajax_respond format, :pagination => "", :render => { :layout => "ajax" }
19
+ end
20
+ end
21
+
22
+ def warnings
23
+ respond_to do |format|
24
+ format.html
25
+ ajax_respond format, :pagination => "disable", :render => { :layout => "ajax" }
26
+ end
27
+ end
28
+ end
@@ -0,0 +1,9 @@
1
+ class SessionsController < ApplicationController
2
+ def count
3
+ session[:count] ||= 0
4
+ if request.post?
5
+ session[:count] += 1
6
+ end
7
+ render :layout => false
8
+ end
9
+ end
@@ -0,0 +1,2 @@
1
+ module ApplicationHelper
2
+ end
@@ -0,0 +1,2 @@
1
+ module PostsHelper
2
+ end
File without changes
File without changes
@@ -0,0 +1,19 @@
1
+ # This model is not actually backed by the database, but conveniently collects all the changelog entries as models
2
+
3
+ require 'will_paginate/array' # because model not backed by database, model returns arrays instead of ActiveRecord Relations
4
+
5
+ class Changelog
6
+ attr_accessor :title, :content
7
+ def initialize(title,content)
8
+ @title = title
9
+ @content = content
10
+ end
11
+ def self.all
12
+ changelogs = IO.read(File.expand_path("../../../../../CHANGELOG.md",__FILE__)).split(/^## /).map{|str| Changelog.new(str.split(/$/,2)[0],str.split(/$/,2)[1])}
13
+ changelogs.slice!(0)
14
+ changelogs
15
+ end
16
+ def self.paginate(options={})
17
+ self.all.paginate(options)
18
+ end
19
+ end
@@ -0,0 +1,10 @@
1
+ <%= will_paginate @changelogs, :params => { :pagination => nil } %>
2
+ <%= ajax_loadzone do %>
3
+ <% @changelogs.each do |changelog| %>
4
+ <%= content_tag :div, :style => "border-bottom: 1px solid black;" do %>
5
+ <h3><%= simple_format(changelog.title) %></h3>
6
+ <%= simple_format(changelog.content) %>
7
+ <% end %>
8
+ <% end %>
9
+ <% end %>
10
+ <%= will_paginate @changelogs, :params => { :pagination => nil } %>
@@ -0,0 +1,3 @@
1
+ <h2 id="changelogpagetitle">Changelog</h2>
2
+
3
+ <%= ajax_section %>
@@ -0,0 +1,8 @@
1
+ <html>
2
+ <head>
3
+ <title><%= (params[:controller] + " " + params[:action]).titleize %> - RailsApp</title>
4
+ </head>
5
+ <body>
6
+ <%= render :template => "layouts/flash" %>
7
+ </body>
8
+ </html>
@@ -0,0 +1,49 @@
1
+ <!DOCTYPE html>
2
+ <html>
3
+ <head>
4
+ <title><%= (params[:controller] + " " + params[:action]).titleize %> - RailsApp</title>
5
+ <%= stylesheet_link_tag "application" %>
6
+ <%= stylesheet_link_tag "scaffold" %>
7
+ <%= stylesheet_link_tag "ajax_pagination" %>
8
+ <%= javascript_include_tag "jquery" %>
9
+ <%= javascript_include_tag "jquery_ujs" %>
10
+ <%= javascript_include_tag "json2" %>
11
+ <%= javascript_include_tag "history_core" %>
12
+ <%= javascript_include_tag "history_adapter_jquery" %>
13
+ <%= javascript_include_tag "jquery.ba-bbq" %>
14
+ <%= javascript_include_tag "jquery.url" %>
15
+ <%= javascript_include_tag "ajax_pagination" %>
16
+ </head>
17
+ <body>
18
+ <div id="countajaxloading" style="display: none;">0</div>
19
+ <script type="text/javascript">
20
+ $(document).ready(function () {
21
+ $(document).on("ajaxp:loading", function() { // increment hidden div every time something loads
22
+ $("#countajaxloading").text((parseInt($("#countajaxloading").text(),10) + 1).toString());
23
+ });
24
+ });
25
+ /*jQuery(document).ready(function () {
26
+ alert($.ajax_pagination.version);
27
+ $.ajax_pagination("").get("http://localhost:3000/pages/about");
28
+ });*/
29
+ </script>
30
+
31
+ <div style="float: right; min-width: 150px;">
32
+ <%= ajax_section :pagination => "count", :history => false do %>
33
+ <%= render :template => "sessions/count" %>
34
+ <% end %>
35
+ </div>
36
+ <h1><%= ajax_link_to "AJAX Pagination Example Application", "broken link", :pagination => "" %><!-- note the broken link is intentional, for testing purposes --></h1>
37
+ <div class="ajaxpagination menu" data-pagination="">
38
+ <ul>
39
+ <li><%= link_to "Home", root_url %></li>
40
+ <li><%= link_to "Changelog", changelog_url %></li>
41
+ <li><%= link_to "Readme", pages_readme_url %></li>
42
+ <li><%= link_to "About", pages_about_url %></li>
43
+ </ul>
44
+ </div>
45
+ <%= ajax_section :pagination => "", :reload => {:urlpart => "path", :urlregex => "^.*$"}, :loadzone => true do %>
46
+ <%= render :template => "layouts/flash" %>
47
+ <% end %>
48
+ </body>
49
+ </html>
@@ -0,0 +1,7 @@
1
+ <% if flash[:notice] %>
2
+ <p id="notice"><%= flash[:notice] %></p>
3
+ <% end %>
4
+ <% if flash[:alert] %>
5
+ <p id="alert"><%= flash[:alert] %></p>
6
+ <% end %>
7
+ <%= yield %>
@@ -0,0 +1,4 @@
1
+ <h1 id="aboutpagetitle">About</h1> <!-- Don't change this line, rspec test uses this to detect About page -->
2
+
3
+ <p>This gem was created by Ronald Chan, who ajaxified his pagination of a rails application. Because the code added some common features, and the code was also modularised, it becomes much more useful to package it up in a gem, so that everybody can use it. The separation of the code also makes the application better managed, since it provides functionality not specific to the application.</p>
4
+ <p>This example application was created for testing purposes. It is also a good example application so that you can see what the gem can do.</p>
@@ -0,0 +1,4 @@
1
+ <h2 id="readmepagetitle">Readme</h2> <!-- Don't change this line, rspec test uses this to detect page -->
2
+ <b>Note: the readme is written in markdown, but is not formatted as such below. It is more suitable to read it on GitHub.</b>
3
+
4
+ <%= simple_format(@readme) %>
@@ -0,0 +1,43 @@
1
+
2
+ This page gives examples of the warnings that may be given, from AJAX Pagination, when some configuration or otherwise is suboptimal, or prevents proper functioning of the gem.
3
+
4
+ <%= content_tag :div, :style => "display: inline-block; width: 300px; height: 100px; border: 1px solid black; margin: 10px; padding: 10px; vertical-align: middle;" do %>
5
+ <%= ajax_section do %>
6
+ <p>You are on page <%= params[:page] ||= 1 %>.</p>
7
+
8
+ <p><%= ajax_link_to "Reload whole page just to refresh this content", pages_warnings_path(:page => (params[:page].to_i+1)), :pagination => "page", :id => "fullpagelink" %></p>
9
+ <% end %>
10
+ <% end %>
11
+
12
+ <%= content_tag :div, :style => "display: inline-block; width: 300px; height: 100px; border: 1px solid black; margin: 10px; padding: 10px; vertical-align: middle;" do %>
13
+ <p>AJAX Pagination Status: <%= raw (params[:disable] ||= false)?"<span style=\"color:red;\">Disabled":"<span style=\"color:green;\">Enabled" %></span></p>
14
+ <% if params[:disable] %>
15
+ <script type="text/javascript">History = null;</script>
16
+ <p><%= link_to "Enable History.js", pages_warnings_path %></p>
17
+ <% else %>
18
+ <p><%= link_to "Disable History.js", pages_warnings_path(:disable => true), :id => "disablehistoryjslink" %></p>
19
+ <% end %>
20
+ <p><i>Note: History.js is an AJAX Pagination dependency.</i></p>
21
+ <% end %>
22
+
23
+ <%= content_tag :div, :style => "display: inline-block; width: 300px; height: 100px; border: 1px solid black; margin: 10px; padding: 10px; vertical-align: middle;" do %>
24
+ <p>AJAX Links need to reference a valid pagination section, otherwise AJAX Pagination doesn't know where the new content should go.</p>
25
+ <p><%= ajax_link_to "Link without valid AJAX Pagination section", pages_warnings_path, :pagination => "RANDOM", :id => "nosectionlink" %></p>
26
+ <% end %>
27
+
28
+ <%= content_tag :div, :style => "display: inline-block; width: 300px; height: 100px; border: 1px solid black; margin: 10px; padding: 10px; vertical-align: middle;" do %>
29
+ <%= content_tag :div, :style => "border: 1px solid black; margin: 10px;" do %>
30
+ <%= ajax_section :pagination => "double" do %>My section name is "double".<% end %>
31
+ <% end %>
32
+ <%= content_tag :div, :style => "border: 1px solid black; margin: 10px;" do %>
33
+ <%= ajax_section :pagination => "double" do %>My section name is "double".<% end %>
34
+ <% end %>
35
+ <p><%= ajax_link_to "Load stuff in section named \"double\"", pages_warnings_path, :pagination => "double", :id => "doublesectionlink" %></p>
36
+ <% end %>
37
+
38
+ <%= content_tag :div, :class => "paginated_section", :style => "display: inline-block; width: 300px; height: 100px; border: 1px solid black; margin: 10px; padding: 10px; vertical-align: middle;" do %>
39
+ <%= content_tag :div, :class => "ajaxpagination" do %>
40
+ <p>If a link does not reference a section into which content can be loaded, AJAX will be cancelled, and the link will load in the whole window.</p>
41
+ <p><%= link_to "Link without reference to any section", pages_warnings_path, :id => "missingreferencelink" %></p>
42
+ <% end %>
43
+ <% end %>
@@ -0,0 +1,6 @@
1
+ <h2 id="welcomepagetitle">Example Rails Application for AJAX Pagination</h2> <!-- Don't change this line, rspec test uses this to detect page -->
2
+ <p>Welcome to the example application for the Rails gem, AJAX Pagination. This gem will ajaxify your pagination and navigation.</p>
3
+
4
+ <p>The posts and changelog are good examples of how pagination of your records can be ajaxified easily. Additionally, the whole site has content which is loaded with AJAX calls, because the menu navigation links also have AJAX Pagination applied to them.</p>
5
+
6
+ <p>This site is used to test the gem. Because a good part of this gem involves javascript, it is tested using the Capybara gem.</p>
@@ -0,0 +1,7 @@
1
+ <span id="submits"><%= session[:count].to_i %></span>
2
+ submit<%= 's' unless session[:count]==1 %> so far.
3
+ <%= ajax_form_tag sessions_count_url, :method => "post", :pagination => "count" do %>
4
+ <span class="actions">
5
+ <%= submit_tag "Submit" %>
6
+ </span>
7
+ <% 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 RailsApp::Application
@@ -0,0 +1,53 @@
1
+ require File.expand_path('../boot', __FILE__)
2
+
3
+ #require 'rails/all'
4
+ require "action_controller/railtie"
5
+ require "action_mailer/railtie"
6
+ require "active_resource/railtie"
7
+ require "rails/test_unit/railtie"
8
+
9
+ Bundler.require
10
+
11
+ module RailsApp
12
+ class Application < Rails::Application
13
+ # Settings in config/environments/* take precedence over those specified here.
14
+ # Application configuration should go into files in config/initializers
15
+ # -- all .rb files in that directory are automatically loaded.
16
+
17
+ # Custom directories with classes and modules you want to be autoloadable.
18
+ # config.autoload_paths += %W(#{config.root}/extras)
19
+
20
+ # Only load the plugins named here, in the order given (default is alphabetical).
21
+ # :all can be used as a placeholder for all plugins not explicitly named.
22
+ # config.plugins = [ :exception_notification, :ssl_requirement, :all ]
23
+
24
+ # Activate observers that should always be running.
25
+ # config.active_record.observers = :cacher, :garbage_collector, :forum_observer
26
+
27
+ # Set Time.zone default to the specified zone and make Active Record auto-convert to this zone.
28
+ # Run "rake -D time" for a list of tasks for finding time zone names. Default is UTC.
29
+ # config.time_zone = 'Central Time (US & Canada)'
30
+
31
+ # The default locale is :en and all translations from config/locales/*.rb,yml are auto loaded.
32
+ # config.i18n.load_path += Dir[Rails.root.join('my', 'locales', '*.{rb,yml}').to_s]
33
+ # config.i18n.default_locale = :de
34
+
35
+ # Configure the default encoding used in templates for Ruby 1.9.
36
+ config.encoding = "utf-8"
37
+
38
+ # Configure sensitive parameters which will be filtered from the log file.
39
+ config.filter_parameters += [:password]
40
+
41
+ # Use SQL instead of Active Record's schema dumper when creating the database.
42
+ # This is necessary if your schema can't be completely dumped by the schema dumper,
43
+ # like if you have constraints or database-specific column types
44
+ # config.active_record.schema_format = :sql
45
+
46
+ # Enforce whitelist mode for mass assignment.
47
+ # This will create an empty whitelist of attributes available for mass-assignment for all models
48
+ # in your app. As such, your models will need to explicitly whitelist or blacklist accessible
49
+ # parameters by using an attr_accessible or attr_protected declaration.
50
+ # config.active_record.whitelist_attributes = true
51
+ end
52
+ end
53
+
@@ -0,0 +1,10 @@
1
+ require 'rubygems'
2
+ gemfile = File.expand_path('../../../../Gemfile', __FILE__)
3
+
4
+ if File.exist?(gemfile)
5
+ ENV['BUNDLE_GEMFILE'] = gemfile
6
+ require 'bundler'
7
+ Bundler.setup
8
+ end
9
+
10
+ $:.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
+ development:
7
+ adapter: sqlite3
8
+ database: db/development.sqlite3
9
+ pool: 5
10
+ timeout: 5000
11
+
12
+ # Warning: The database defined as "test" will be erased and
13
+ # re-generated from your development database when you run "rake".
14
+ # Do not set this db to the same as development or production.
15
+ test:
16
+ adapter: sqlite3
17
+ database: db/test.sqlite3
18
+ pool: 5
19
+ timeout: 5000
20
+
21
+ production:
22
+ adapter: sqlite3
23
+ database: db/development.sqlite3 # this is only an example application (in case anybody is using production, so that the database is not blank)
24
+ pool: 5
25
+ timeout: 5000
@@ -0,0 +1,6 @@
1
+ # Load the rails application
2
+ require File.expand_path('../application', __FILE__)
3
+ require 'will_paginate'
4
+
5
+ # Initialize the rails application
6
+ RailsApp::Application.initialize!
@@ -0,0 +1,25 @@
1
+ RailsApp::Application.configure do
2
+ # Settings specified here will take precedence over those in config/application.rb
3
+
4
+ # In the development environment your application's code is reloaded on
5
+ # every request. This slows down response time but is perfect for development
6
+ # since you don't have to restart the web server when you make code changes.
7
+ config.cache_classes = false
8
+
9
+ # Log error messages when you accidentally call methods on nil.
10
+ config.whiny_nils = true
11
+
12
+ # Show full error reports and disable caching
13
+ config.consider_all_requests_local = true
14
+ config.action_controller.perform_caching = false
15
+
16
+ # Don't care if the mailer can't send
17
+ config.action_mailer.raise_delivery_errors = false
18
+
19
+ # Print deprecation notices to the Rails logger
20
+ config.active_support.deprecation = :log
21
+
22
+ # Only use best-standards-support built into browsers
23
+ config.action_dispatch.best_standards_support = :builtin
24
+
25
+ end
@@ -0,0 +1,43 @@
1
+ RailsApp::Application.configure do
2
+ # Settings specified here will take precedence over those in config/application.rb
3
+
4
+ # Code is not reloaded between requests
5
+ config.cache_classes = true
6
+
7
+ # Full error reports are disabled and caching is turned on
8
+ config.consider_all_requests_local = false
9
+ config.action_controller.perform_caching = true
10
+
11
+ # Specifies the header that your server uses for sending files
12
+ # config.action_dispatch.x_sendfile_header = "X-Sendfile" # for apache
13
+ # config.action_dispatch.x_sendfile_header = 'X-Accel-Redirect' # for nginx
14
+
15
+ # Force all access to the app over SSL, use Strict-Transport-Security, and use secure cookies.
16
+ # config.force_ssl = true
17
+
18
+ # See everything in the log (default is :info)
19
+ # config.log_level = :debug
20
+
21
+ # Prepend all log lines with the following tags
22
+ # config.log_tags = [ :subdomain, :uuid ]
23
+
24
+ # Use a different logger for distributed setups
25
+ # config.logger = ActiveSupport::TaggedLogging.new(SyslogLogger.new)
26
+
27
+ # Use a different cache store in production
28
+ # config.cache_store = :mem_cache_store
29
+
30
+ # Disable delivery errors, bad email addresses will be ignored
31
+ # config.action_mailer.raise_delivery_errors = false
32
+
33
+ # Enable threaded mode
34
+ # config.threadsafe!
35
+
36
+ # Enable locale fallbacks for I18n (makes lookups for any locale fall back to
37
+ # the I18n.default_locale when a translation can not be found)
38
+ config.i18n.fallbacks = true
39
+
40
+ # Send deprecation notices to registered listeners
41
+ config.active_support.deprecation = :notify
42
+
43
+ end