Commit 92cdf300 authored by Mario Manno's avatar Mario Manno Committed by Mario Manno

upgrade to rails 4.2.3 config and gems

parent 565ac4cd
......@@ -14,7 +14,6 @@ rerun.txt
.sass-cache/
.idea/
.redcar/
bin/
bundler/
cache/
gems/
......
source 'http://rubygems.org'
source 'https://rubygems.org'
gem 'rails', '~> 3.2.22'
gem 'rails', '~> 4.2'
# Use SCSS for stylesheets
gem 'sass-rails', '~> 5.0'
# Use Uglifier as compressor for JavaScript assets
gem 'uglifier', '>= 1.3.0'
# Use CoffeeScript for .coffee assets and views
gem 'coffee-rails', '~> 4.1.0'
gem 'mysql2', group: :mysql
gem 'pg', group: :postgresql
gem 'sqlite3', group: :sqlite3
# Use jquery as the JavaScript library
gem 'jquery-rails'
gem 'jquery-migrate-rails'
gem 'jquery-ui-rails'
# Build JSON APIs with ease. Read more: https://github.com/rails/jbuilder
gem 'jbuilder', '~> 2.0'
gem 'acts_as_commentable'
gem 'barista'
gem 'bcrypt-ruby', '~> 3.0.0'
gem 'bcrypt-ruby'
gem 'cancancan'
gem 'cocoon'
gem 'formtastic', '~> 2.1.0'
gem 'formtastic-bootstrap', :git => "git://github.com/frab/formtastic-bootstrap.git"
gem 'gravatar-ultimate'
gem 'formtastic'
gem 'formtastic-bootstrap'
gem 'haml'
gem 'jquery-rails', '~> 1.0.19'
gem 'json'
gem 'jbuilder'
gem 'localized_language_select', git: "git://github.com/frab/localized_language_select.git", branch: 'rails3'
gem 'localized_language_select', '0.3.0', :git => "git://github.com/frab/localized_language_select.git"
gem 'nokogiri'
gem 'paperclip', '< 3.0'
gem 'paper_trail', '2.3.3'
gem "paperclip", "~> 4.1"
gem 'paper_trail'
gem 'prawn', '< 1.0'
gem 'prawn_rails'
gem 'ransack'
gem 'ri_cal'
gem 'sucker_punch', '~> 1.0'
gem 'sucker_punch'
gem 'settingslogic'
gem 'transitions', :require => ["transitions", "active_record/transitions"]
gem 'twitter-bootstrap-rails', :git => "git://github.com/frab/twitter-bootstrap-rails.git", :ref => "5e62b21c8f258010af7f5bc858b89a24f16936a9"
gem 'will_paginate'
gem 'strong_parameters'
group :development, :test do
gem 'bullet'
gem 'pry-rails'
......@@ -42,24 +49,14 @@ end
group :test do
gem 'factory_girl_rails', '~> 4.0'
gem 'minitest'
gem 'test-unit', '~> 3.0'
gem 'turn', :require => false
gem 'rails-perftest'
gem 'ruby-prof'
end
group :development do
gem 'quiet_assets' # silence asset requests
gem 'shotgun'
gem 'yaml_db'
group :doc do
gem 'redcarpet' # documentation
gem 'github-markdown' # documentation
gem 'yard' # documentation
#gem 'rails-erd' # graph
#gem 'ruby-graphviz', :require => 'graphviz' # Optional: only required for graphing
end
group :assets do
gem 'coffee-rails', " ~> 3.2.0"
gem 'sass-rails', " ~> 3.2.0"
gem 'uglifier'
end
This diff is collapsed.
//= require jquery
//= require jquery-migrate-min
//= require jquery_ujs
//= require jquery-ui
//= require jquery-ui-timepicker-addon
......
#!/usr/bin/env ruby
ENV['BUNDLE_GEMFILE'] ||= File.expand_path('../../Gemfile', __FILE__)
load Gem.bin_path('bundler', 'bundle')
#!/usr/bin/env ruby
APP_PATH = File.expand_path('../../config/application', __FILE__)
require_relative '../config/boot'
require 'rails/commands'
#!/usr/bin/env ruby
require_relative '../config/boot'
require 'rake'
Rake.application.run
#!/usr/bin/env ruby
require 'pathname'
# path to your application root.
APP_ROOT = Pathname.new File.expand_path('../../', __FILE__)
Dir.chdir APP_ROOT do
# This script is a starting point to setup your application.
# Add necessary setup steps to this file:
puts "== Installing dependencies =="
system "gem install bundler --conservative"
system "bundle check || bundle install --without mysql postgresql"
puts "\n== Copying sample files =="
unless File.exist?("config/database.yml")
system "cp config/database.yml.template config/database.yml"
end
unless File.exist?("config/settings.yml")
system "cp config/settings.yml.template config/settings.yml"
end
puts "\n== Preparing database =="
system "bin/rake db:setup"
puts "\n== Removing old logs and tempfiles =="
system "rm -f log/*"
system "rm -rf tmp/cache"
puts "\n== Restarting application server =="
system "touch tmp/restart.txt"
end
......@@ -2,12 +2,9 @@ require File.expand_path('../boot', __FILE__)
require 'rails/all'
if defined?(Bundler)
# If you precompile assets before deploying to production, use this line
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
# Require the gems listed in Gemfile, including any gems
# you've limited to :test, :development, or :production.
Bundler.require(*Rails.groups)
module Frab
class Application < Rails::Application
......@@ -15,17 +12,6 @@ module Frab
# Application configuration should go into files in config/initializers
# -- all .rb files in that directory are automatically loaded.
# Custom directories with classes and modules you want to be autoloadable.
# config.autoload_paths += %W(#{config.root}/extras)
config.autoload_paths += %W(#{config.root}/lib)
# 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 = 'Central Time (US & Canada)'
......@@ -34,8 +20,11 @@ module Frab
# config.i18n.load_path += Dir[Rails.root.join('my', 'locales', '*.{rb,yml}').to_s]
# config.i18n.default_locale = :de
# JavaScript files you want as :defaults (application.js is always included).
config.action_view.javascript_expansions[:defaults] = %w(jquery.js rails.js)
# Do not swallow errors in after_commit/after_rollback callbacks.
config.active_record.raise_in_transactional_callbacks = true
# Custom directories with classes and modules you want to be autoloadable.
config.autoload_paths += %W(#{config.root}/lib)
# Configure the default encoding used in templates for Ruby 1.9.
config.encoding = "utf-8"
......@@ -43,20 +32,11 @@ module Frab
# Configure sensitive parameters which will be filtered from the log file.
config.filter_parameters += [:password, :password_confirmation]
# 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'
# Use strong parameters
config.active_record.whitelist_attributes = false
config.action_controller.action_on_unpermitted_parameters = :raise
# smaller whitelist of allowed tags
config.after_initialize do
ActionView::Base.sanitized_allowed_tags.delete 'img'
ActionView::Base.sanitized_allowed_protocols.delete 'urn'
end
# TODO config.action_view.sanitized_allowed_tags.delete 'img'
#config.after_initialize do
#ActionView::Base.sanitized_allowed_tags.delete 'img'
#ActionView::Base.sanitized_allowed_protocols.delete 'urn'
#end
end
end
require 'rubygems'
ENV['BUNDLE_GEMFILE'] ||= File.expand_path('../../Gemfile', __FILE__)
# Set up gems listed in the Gemfile.
gemfile = File.expand_path('../../Gemfile', __FILE__)
begin
ENV['BUNDLE_GEMFILE'] = gemfile
require 'bundler'
Bundler.setup
rescue Bundler::GemNotFound => e
STDERR.puts e.message
STDERR.puts "Try running `bundle install`."
exit!
end if File.exist?(gemfile)
require 'bundler/setup' # Set up gems listed in the Gemfile.
# Load the rails application
# Load the Rails application.
require File.expand_path('../application', __FILE__)
# Initialize the rails application
# Initialize the Rails Application.
Frab::Application.initialize!
......@@ -2,34 +2,43 @@ Frab::Application.configure do
# Settings specified here will take precedence over those in config/application.rb
# In the development environment your application's code is reloaded on
# every request. This slows down response time but is perfect for development
# since you don't have to restart the webserver when you make code changes.
# every request. This slows down response time but is perfect for development
# since you don't have to restart the web server when you make code changes.
config.cache_classes = false
# Log error messages when you accidentally call methods on nil.
config.whiny_nils = true
# Do not eager load code on boot.
config.eager_load = false
# Show full error reports and disable caching
# Show full error reports and disable caching.
config.consider_all_requests_local = true
config.action_controller.perform_caching = false
# Don't care if the mailer can't send
# Don't care if the mailer can't send.
config.action_mailer.raise_delivery_errors = false
config.action_mailer.default_url_options = { host: 'localhost:3000' }
# Print deprecation notices to the Rails logger
# Print deprecation notices to the Rails logger.
config.active_support.deprecation = :log
# Only use best-standards-support built into browsers
config.action_dispatch.best_standards_support = :builtin
# Do not compress assets
config.assets.compress = false
# Raise an error on page load if there are pending migrations.
config.active_record.migration_error = :page_load
# Expands the lines which load the assets
# Debug mode disables concatenation and preprocessing of assets.
# This option may cause significant delays in view rendering with a large
# number of complex assets.
config.assets.debug = false
# Asset digests allow you to set far-future HTTP expiration dates on all assets,
# yet still be able to expire them through the digest params.
config.assets.digest = true
# Adds additional error checking when serving assets at runtime.
# Checks for improperly declared sprockets dependencies.
# Raises helpful error messages.
config.assets.raise_runtime_errors = true
# Raises error for missing translations
# config.action_view.raise_on_missing_translations = true
# bullet
config.after_initialize do
Bullet.enable = true
......
Frab::Application.configure do
# Settings specified here will take precedence over those in config/application.rb
# Settings specified here will take precedence over those in config/application.rb.
# The production environment is meant for finished, "live" apps.
# Code is not reloaded between requests
# Code is not reloaded between requests.
config.cache_classes = true
# Full error reports are disabled and caching is turned on
# Eager load code on boot. This eager loads most of Rails and
# your application in memory, allowing both threaded web servers
# and those relying on copy on write to perform better.
# Rake tasks automatically ignore this option for performance.
config.eager_load = true
# Full error reports are disabled and caching is turned on.
config.consider_all_requests_local = false
config.action_controller.perform_caching = true
# Disable Rails's static asset server (Apache or nginx will already do this)
config.serve_static_assets = false
# Enable Rack::Cache to put a simple HTTP cache in front of your application
# Add `rack-cache` to your Gemfile before enabling this.
# For large-scale production use, consider using a caching reverse proxy like
# NGINX, varnish or squid.
# config.action_dispatch.rack_cache = true
# Compress JavaScripts and CSS
config.assets.compress = true
# Disable serving static files from the `/public` folder by default since
# Apache or NGINX already handles this.
config.serve_static_files = ENV['RAILS_SERVE_STATIC_FILES'].present?
# Don't fallback to assets pipeline if a precompiled asset is missed
config.assets.compile = false
# Compress JavaScripts and CSS.
config.assets.js_compressor = :uglifier
# config.assets.css_compressor = :sass
config.assets.precompile += ['admin.css', 'admin.js', 'schedule.js', 'public_schedule.css', 'public_schedule_print.css', 'public_schedule.js', 'moment.min.js']
# Do not fallback to assets pipeline if a precompiled asset is missed.
config.assets.compile = false
# Generate digests for assets URLs
# Asset digests allow you to set far-future HTTP expiration dates on all assets,
# yet still be able to expire them through the digest params.
config.assets.digest = true
# Specifies the header that your server uses for sending files
#config.action_dispatch.x_sendfile_header = "X-Sendfile"
# `config.assets.precompile` and `config.assets.version` have moved to config/initializers/assets.rb
# For nginx:
config.action_dispatch.x_sendfile_header = 'X-Accel-Redirect'
# Specifies the header that your server uses for sending files.
# config.action_dispatch.x_sendfile_header = 'X-Sendfile' # for Apache
# config.action_dispatch.x_sendfile_header = 'X-Accel-Redirect' # for NGINX
# If you have no front-end server that supports something like X-Sendfile,
# just comment this out and Rails will serve the files
# Force all access to the app over SSL, use Strict-Transport-Security, and use secure cookies.
# config.force_ssl = true
# See everything in the log (default is :info)
# config.log_level = :debug
# Use the lowest log level to ensure availability of diagnostic information
# when problems arise.
config.log_level = :debug
# Use a different logger for distributed setups
# config.logger = SyslogLogger.new
# Prepend all log lines with the following tags.
# config.log_tags = [ :subdomain, :uuid ]
# Use a different cache store in production
# config.cache_store = :mem_cache_store
# Use a different logger for distributed setups.
# config.logger = ActiveSupport::TaggedLogging.new(SyslogLogger.new)
# Disable Rails's static asset server
# In production, Apache or nginx will already do this
config.serve_static_assets = false
# Use a different cache store in production.
# config.cache_store = :mem_cache_store
# Enable serving of images, stylesheets, and javascripts from an asset server
# config.action_controller.asset_host = "http://assets.example.com"
# Enable serving of images, stylesheets, and JavaScripts from an asset server.
# config.action_controller.asset_host = 'http://assets.example.com'
# Disable delivery errors, bad email addresses will be ignored
# Ignore bad email addresses and do not raise email delivery errors.
# Set this to true and configure the email server for immediate delivery to raise delivery errors.
# config.action_mailer.raise_delivery_errors = false
# Enable threaded mode
# config.threadsafe!
# Enable locale fallbacks for I18n (makes lookups for any locale fall back to
# the I18n.default_locale when a translation can not be found)
# the I18n.default_locale when a translation cannot be found).
config.i18n.fallbacks = true
# Send deprecation notices to registered listeners
# Send deprecation notices to registered listeners.
config.active_support.deprecation = :notify
end
# Don't show trace pages in production! Requests shall never originate from localhost!
# see: http://helderribeiro.net/?p=357
class ActionDispatch::Request
def local?
false
end
# Use default logging formatter so that PID and timestamp are not suppressed.
config.log_formatter = ::Logger::Formatter.new
# Do not dump schema after migrations.
config.active_record.dump_schema_after_migration = false
# Precompile additional assets.
# application.js, application.css, and all non-JS/CSS in app/assets folder are already added.
config.assets.precompile += ['admin.css', 'admin.js', 'schedule.js', 'public_schedule.css', 'public_schedule_print.css', 'public_schedule.js', 'moment.min.js']
end
Frab::Application.configure do
# Settings specified here will take precedence over those in config/application.rb
# Settings specified here will take precedence over those in config/application.rb.
# The test environment is used exclusively to run your application's
# test suite. You never need to work with it otherwise. Remember that
# test suite. You never need to work with it otherwise. Remember that
# your test database is "scratch space" for the test suite and is wiped
# and recreated between test runs. Don't rely on the data there!
# and recreated between test runs. Don't rely on the data there!
config.cache_classes = true
# Configure static asset server for tests with Cache-Control for performance
config.serve_static_assets = true
config.static_cache_control = "public, max-age=3600"
# Do not eager load code on boot. This avoids loading your whole application
# just for the purpose of running a single test. If you are using a tool that
# preloads Rails for running tests, you may have to set it to true.
config.eager_load = false
# Log error messages when you accidentally call methods on nil
config.whiny_nils = true
# Configure static file server for tests with Cache-Control for performance.
config.serve_static_files = true
config.static_cache_control = 'public, max-age=3600'
# Show full error reports and disable caching
# Show full error reports and disable caching.
config.consider_all_requests_local = true
config.action_controller.perform_caching = false
# Raise exceptions instead of rendering exception templates
# Raise exceptions instead of rendering exception templates.
config.action_dispatch.show_exceptions = false
# Disable request forgery protection in test environment
config.action_controller.allow_forgery_protection = false
# Disable request forgery protection in test environment.
config.action_controller.allow_forgery_protection = false
# Tell Action Mailer not to deliver emails to the real world.
# The :test delivery method accumulates sent emails in the
# ActionMailer::Base.deliveries array.
config.action_mailer.delivery_method = :test
config.action_mailer.default_url_options = {host: "localhost:3000"}
# Randomize the order test cases are executed.
config.active_support.test_order = :random
# Use SQL instead of Active Record's schema dumper when creating the test 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
# Print deprecation notices to the stderr
# Print deprecation notices to the stderr.
config.active_support.deprecation = :stderr
# Raises error for missing translations
# config.action_view.raise_on_missing_translations = true
# Allow pass debug_assets=true as a query parameter to load pages with unpackaged assets
config.assets.allow_debugging = true
......
# Configure barista.
Barista.configure do |c|
# Change the root to use app/scripts
# c.root = Rails.root.join("app", "scripts")
# Change the output root, causing Barista to compile into public/coffeescripts
# c.output_root = Rails.root.join("public", "coffeescripts")
#
# Disable auto compile, use generated file directly:
# c.auto_compile = false
# Add a new framework:
# c.register :tests, root: Rails.root.join('test', 'coffeescript'), output_prefix: 'test'
# Disable wrapping in a closure:
# c.bare = true
# ... or ...
# c.bare!
# Change the output root for a framework:
# c.change_output_prefix! 'framework-name', 'output-prefix'
# or for all frameworks...
# c.each_framework do |framework|
# c.change_output_prefix! framework, "vendor/#{framework.name}"
# end
# or, prefix the path for the app files:
# c.change_output_prefix! :default, 'my-app-name'
# or, change the directory the framework goes into full stop:
# c.change_output_prefix! :tests, Rails.root.join('spec', 'javascripts')
# or, hook into the compilation:
# c.before_compilation { |path| puts "Barista: Compiling #{path}" }
# c.on_compilation { |path| puts "Barista: Successfully compiled #{path}" }
# c.on_compilation_error { |path, output| puts "Barista: Compilation of #{path} failed with:\n#{output}" }
# c.on_compilation_with_warning { |path, output| puts "Barista: Compilation of #{path} had a warning:\n#{output}" }
# Turn off preambles and exceptions on failure:
# c.verbose = false
# Or, make sure it is always on
# c.verbose!
# If you want to use a custom JS file, you can as well
# e.g. vendoring CoffeeScript in your application:
# c.js_path = Rails.root.join('public', 'javascripts', 'coffee-script.js')
# Make helpers and the HAML filter output coffee-script instead of the compiled JS.
# Used in combination with the coffeescript_interpreter_js helper in Rails.
# c.embedded_interpreter = true
end
# Be sure to restart your server when you modify this file.
Rails.application.config.action_dispatch.cookies_serializer = :json
# disable xml parameter parsing
ActionDispatch::ParamsParser::DEFAULT_PARSERS.delete(Mime::XML)
# Be sure to restart your server when you modify this file.
# Configure sensitive parameters which will be filtered from the log file.
Rails.application.config.filter_parameters += [:password]
# encoding: utf-8
# --------------------------------------------------------------------------------------------------
# Please note: If you're subclassing Formtastic::SemanticFormBuilder in a Rails 3 project,
# Formtastic uses class_attribute for these configuration attributes instead of the deprecated
# class_inheritable_attribute. The behaviour is slightly different with subclasses (especially
# around attributes with Hash or Array) values, so make sure you understand what's happening.
# See the documentation for class_attribute in ActiveSupport for more information.
# --------------------------------------------------------------------------------------------------
# Set the default text field size when input is a string. Default is nil.
# Formtastic::SemanticFormBuilder.default_text_field_size = 50
# Formtastic::FormBuilder.default_text_field_size = 50
# Set the default text area height when input is a text. Default is 20.
# Formtastic::SemanticFormBuilder.default_text_area_height = 5
# Formtastic::FormBuilder.default_text_area_height = 5
# Set the default text area width when input is a text. Default is nil.
# Formtastic::SemanticFormBuilder.default_text_area_width = 50
# Formtastic::FormBuilder.default_text_area_width = 50
# Should all fields be considered "required" by default?
# Rails 2 only, ignored by Rails 3 because it will never fall back to this default.
# Defaults to true.
# Formtastic::SemanticFormBuilder.all_fields_required_by_default = true
# Formtastic::FormBuilder.all_fields_required_by_default = true
# Should select fields have a blank option/prompt by default?
# Defaults to true.
# Formtastic::SemanticFormBuilder.include_blank_for_select_by_default = true
# Formtastic::FormBuilder.include_blank_for_select_by_default = true
# Set the string that will be appended to the labels/fieldsets which are required
# It accepts string or procs and the default is a localized version of
# '<abbr title="required">*</abbr>'. In other words, if you configure formtastic.required
# in your locale, it will replace the abbr title properly. But if you don't want to use
# abbr tag, you can simply give a string as below
# Formtastic::SemanticFormBuilder.required_string = "(required)"
# Formtastic::FormBuilder.required_string = "(required)"
# Set the string that will be appended to the labels/fieldsets which are optional
# Defaults to an empty string ("") and also accepts procs (see required_string above)
# Formtastic::SemanticFormBuilder.optional_string = "(optional)"
# Formtastic::FormBuilder.optional_string = "(optional)"
# Set the way inline errors will be displayed.
# Defaults to :sentence, valid options are :sentence, :list, :first and :none
# Formtastic::SemanticFormBuilder.inline_errors = :sentence
# Formtastic::FormBuilder.inline_errors = :sentence
# Formtastic uses the following classes as default for hints, inline_errors and error list
# If you override the class here, please ensure to override it in your formtastic_changes.css stylesheet as well
# Formtastic::SemanticFormBuilder.default_hint_class = "inline-hints"
# Formtastic::SemanticFormBuilder.default_inline_error_class = "inline-errors"
# Formtastic::SemanticFormBuilder.default_error_list_class = "errors"
# If you override the class here, please ensure to override it in your stylesheets as well
# Formtastic::FormBuilder.default_hint_class = "inline-hints"
# Formtastic::FormBuilder.default_inline_error_class = "inline-errors"
# Formtastic::FormBuilder.default_error_list_class = "errors"
# Set the method to call on label text to transform or format it for human-friendly
# reading when formtastic is used without object. Defaults to :humanize.
# Formtastic::SemanticFormBuilder.label_str_method = :humanize
# Formtastic::FormBuilder.label_str_method = :humanize
# Set the array of methods to try calling on parent objects in :select and :radio inputs
# for the text inside each @<option>@ tag or alongside each radio @<input>@. The first method
# that is found on the object will be used.
# Defaults to ["to_label", "display_name", "full_name", "name", "title", "username", "login", "value", "to_s"]
# Formtastic::SemanticFormBuilder.collection_label_methods = [
# Formtastic::FormBuilder.collection_label_methods = [
# "to_label", "display_name", "full_name", "name", "title", "username", "login", "value", "to_s"]
# Formtastic by default renders inside li tags the input, hints and then
# errors messages. Sometimes you want the hints to be rendered first than
# the input, in the following order: hints, input and errors. You can
# customize it doing just as below:
# Formtastic::SemanticFormBuilder.inline_order = [:input, :hints, :errors]
# Specifies if labels/hints for input fields automatically be looked up using I18n.
# Default value: true. Overridden for specific fields by setting value to true,
# i.e. :label => true, or :hint => true (or opposite depending on initialized value)
# Formtastic::FormBuilder.i18n_lookups_by_default = false
# Additionally, you can customize the order for specific types of inputs.
# This is configured on a type basis and if a type is not found it will
# fall back to the default order as defined by #inline_order
# Formtastic::SemanticFormBuilder.custom_inline_order[:checkbox] = [:errors, :hints, :input]
# Formtastic::SemanticFormBuilder.custom_inline_order[:select] = [:hints, :input, :errors]
# Specifies if I18n lookups of the default I18n Localizer should be cached to improve performance.
# Defaults to true.
# Formtastic::FormBuilder.i18n_cache_lookups = false
# Specifies if labels/hints for input fields automatically be looked up using I18n.
# Default value: false. Overridden for specific fields by setting value to true,
# i.e. label: true, or hint: true (or opposite depending on initialized value)
Formtastic::FormBuilder.i18n_lookups_by_default = true
# Specifies the class to use for localization lookups. You can create your own
# class and use it instead by subclassing Formtastic::Localizer (which is the default).
# Formtastic::FormBuilder.i18n_localizer = MyOwnLocalizer
# You can add custom inputs or override parts of Formtastic by subclassing SemanticFormBuilder and
# specifying that class here. Defaults to SemanticFormBuilder.
# Formtastic::SemanticFormHelper.builder = MyCustomBuilder
# You can add custom inputs or override parts of Formtastic by subclassing Formtastic::FormBuilder and
# specifying that class here. Defaults to Formtastic::FormBuilder.
Formtastic::Helpers::FormHelper.builder = FormtasticBootstrap::FormBuilder
FormtasticBootstrap::FormBuilder.default_inline_hint_class = FormtasticBootstrap::FormBuilder.default_block_hint_class
# You can opt-in to Formtastic's use of the HTML5 `required` attribute on `<input>`, `<select>`
# and `<textarea>` tags by setting this to false (defaults to true).
# Formtastic::FormBuilder.use_required_attribute = true
# You can opt-in to new HTML5 browser validations (for things like email and url inputs) by setting
# this to false. Doing so will add a `novalidate` attribute to the `<form>` tag.
# See http://diveintohtml5.org/forms.html#validation for more info.
# Formtastic::FormBuilder.perform_browser_validations = true
# Be sure to restart your server when you modify this file.
# Add new inflection rules using the following format
# (all these examples are active by default):
# ActiveSupport::Inflector.inflections do |inflect|
# Add new inflection rules using the following format. Inflections
# are locale specific, and you may define rules for as many different
# locales as you wish. All of these examples are active by default:
# ActiveSupport::Inflector.inflections(:en) do |inflect|
# inflect.plural /^(ox)$/i, '\1en'
# inflect.singular /^(ox)en/i, '\1'
# inflect.irregular 'person', 'people'
# inflect.uncountable %w( fish sheep )
# end
# These inflection rules are supported but not enabled by default:
# ActiveSupport::Inflector.inflections(:en) do |inflect|
# inflect.acronym 'RESTful'
# end
ActiveSupport::Inflector.inflections do |inflect|
inflect.uncountable "call_for_papers"
end
# Be sure to restart your server when you modify this file.