From 37dd1d0fab5729d894608094a4cfaa17c1ca6423 Mon Sep 17 00:00:00 2001 From: Jon Atack Date: Wed, 22 Oct 2014 23:53:26 +0200 Subject: [PATCH] More README improvements [skip ci] --- README.md | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) diff --git a/README.md b/README.md index 14da4be..1a0c85e 100644 --- a/README.md +++ b/README.md @@ -533,16 +533,14 @@ artists.result.to_sql ### Using SimpleForm -If you want to combine form builders of ransack and SimpleForm, just set the -RANSACK_FORM_BUILDER environment variable before Rails started, e.g. in -``config/application.rb`` before ``require 'rails/all'`` and of course use -``gem 'simple_form'`` in your ``Gemfile``: +If you would like to combine the Ransack and SimpleForm form builders, set the +`RANSACK_FORM_BUILDER` environment variable before Rails boots up, e.g. in +`config/application.rb` before `require 'rails/all'` as shown below (and add +`gem 'simple_form'` to your `Gemfile`). ```ruby require File.expand_path('../boot', __FILE__) - ENV['RANSACK_FORM_BUILDER'] = '::SimpleForm::FormBuilder' - require 'rails/all' ``` @@ -554,9 +552,9 @@ many translations for Ransack available at http://www.localeapp.com/projects/2999. Predicate and attribute translations in forms may be specified as follows (see -the locale files in [Ransack::Locale](lib/ransack/locale) for more examples): +the translation files in [Ransack::Locale](lib/ransack/locale) for more examples): -`locales/en.yml` +locales/en.yml: ```yml en: ransack: