README.md in traco-3.2.1 vs README.md in traco-4.0.0
- old
+ new
@@ -1,10 +1,10 @@
# Traco
[![Build Status](https://secure.travis-ci.org/barsoom/traco.png)](http://travis-ci.org/barsoom/traco)
-Translatable attributes for Rails 3 and 4 (Ruby 1.9+), stored in the model table itself.
+Translatable attributes for Ruby on Rails, stored in the model table itself.
Inspired by Iain Hecker's [translatable_columns](https://github.com/iain/translatable_columns/).
To store translations outside the model, see Sven Fuchs' [Globalize](https://github.com/globalize/globalize).
@@ -44,10 +44,12 @@
`#title`: Shows the title in the current locale. If blank, falls back to default locale. Otherwise nil.
`#title=`: Assigns the title to the column for the current locale, if present. Raises if the column doesn't exist.
+`#title?`: Is the title present? Respects the Traco [fallback](#fallbacks) setting.
+
`.human_attribute_name(:title_sv)`: Extends this standard method to return "Title (Swedish)" if you have a translation key `i18n.languages.sv = "Swedish"` and "Title (SV)" otherwise. Rails uses this method to build validation error messages and form labels.
`.translatable_attributes`: Returns an array like `[:title, :body]`.
`.locale_columns(:title)`: Returns an array like `[:title_sv, :title_en]` sorted with default locale first and then alphabetically. Suitable for looping in forms:
@@ -118,10 +120,10 @@
## Installation
Add this to your `Gemfile`:
```ruby
-gem 'traco'
+gem "traco"
```
Then run
bundle