README.rdoc in simple_model_translations-0.1.3 vs README.rdoc in simple_model_translations-0.1.4
- old
+ new
@@ -4,17 +4,18 @@
It borrows some things from globalize3[http://github.com/svenfuchs/globalize3] and puret[http://github.com/jo/puret].
== Basic Usage
For example, you are dealing with a website for some magazine, and you want your articles to be translated.
-So, you'll need the following models to achieve this behaviour:
+So, you'll need the following models to achieve this behaviour
+(warning: ArticleTranslation should be defined before Article, or Rails should be able to autoload it):
- class Article < ActiveRecord::Base
- translates :name, :content
- end
-
class ArticleTranslation < ActiveRecord::Base
translation_for :article
+ end
+
+ class Article < ActiveRecord::Base
+ translates :name, :content
end
or, if you are not going to add some additional behavior to translation class (for example, validations),
you can use translation class, created for you by default: