# -*- encoding : utf-8 -*- require File.expand_path('../boot', __FILE__) require 'rails/all' # MK R9 change # added to avoid: # https://github.com/whitequark/rack-utf8_sanitizer/issues/17 require "rack/utf8_sanitizer" if defined?(Bundler) # If you precompile assets before deploying to production, use this line ActiveSupport::Deprecation.silenced = true # MK R9 change # removed to avoid: https://github.com/rails/webpacker/issues/3048 # Bundler.require(*Rails.groups(:assets => %w(development test))) # If you want your assets lazily compiled in production, use this line # Bundler.require(:default, :assets, Rails.env) end # if ENV['RAILS_ENV'] == 'development' # require 'simplecov' # SimpleCov.start do # add_filter "app/assets/" # add_filter "app/helpers/" # add_filter "app/views/" # add_filter "lib/" # add_filter "config/" # # add_group "Models", "app/models" # add_group "Controllers", "app/controllers" # # puts "required simplecov" # end # end module Mor class Application < Rails::Application # Settings in config/environments/* take precedence over those specified here. # Application configuration should go into files in config/initializers # -- all .rb files in that directory are automatically loaded. # automatic attribute protection # config.whitelist_attributes = true # Custom directories with classes and modules you want to be autoloadable. config.autoload_paths += %W(#{config.root}/extras) config.autoload_paths += Dir["#{config.root}/lib/**/"] config.autoload_paths += Dir["#{config.root}/lang/**/"] # 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. # config.plugins = [ :exception_notification, :ssl_requirement, :all ] # Activate observers that should always be running. # 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. # Run "rake -D time" for a list of tasks for finding time zone names. Default is UTC. config.time_zone = 'Vilnius' config.active_record.default_timezone = :local config.active_record.time_zone_aware_attributes = false # I18n.enforce_available_locales will default to true in the future. If you really want to skip validation of your locale you can set I18n.enforce_available_locales = false to avoid this message. I18n.enforce_available_locales = false # disable warnings ActiveSupport::Deprecation.silenced = true # The default locale is :en and all translations from config/locales/*.rb,yml are auto loaded. # config.i18n.load_path += Dir[Rails.root.join('my', 'locales', '*.{rb,yml}').to_s] # # Configure the default encoding used in templates for Ruby 1.9. config.encoding = "utf-8" # Getting rid of "invalid byte sequence in UTF-8" config.middleware.insert 0, Rack::UTF8Sanitizer # Configure sensitive parameters which will be filtered from the log file. config.filter_parameters += [:password, :psw, :number, :code_2fa] # Use SQL instead of Active Record's schema dumper when creating the database. # 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. # 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. # MK R9 change # disabled to avoid: undefined method `whitelist_attributes=' for ActiveRecord::Base:Class (NoMethodError) # https://stackoverflow.com/questions/27556631/bug-when-switching-to-rails-4-1-method-missing-undefined-method-whitelist #config.active_record.whitelist_attributes = false # MK R9 change # disabled to avoid: undefined method `assets' for #