Permalink
Browse files

Clarify globalize slug documentation further

It should now be clear that both the model's table and the model's
translation table must have a slug field, and the model must declare the
slug field translatable.
  • Loading branch information...
1 parent 30e663d commit 7b9a30da9018aad6b99e891ea505d7345e375134 @robyurkowski robyurkowski committed Jul 4, 2012
Showing with 6 additions and 4 deletions.
  1. +3 −2 Guide.rdoc
  2. +3 −2 lib/friendly_id/globalize.rb
View
@@ -480,8 +480,9 @@ languages. If your application only needs to be localized to one or two
languages, you may wish to consider the {FriendlyId::SimpleI18n SimpleI18n}
module.
-In order to use this module, your model's translation table must have a slug
-column and must set the field +slug+ as translatable with Globalize:
+In order to use this module, your model's table and translation table must both
+have a slug column, and your model must set the +slug+ field as translatable
+with Globalize:
class Post < ActiveRecord::Base
translates :title, :slug
@@ -13,8 +13,9 @@ module is most suitable for applications that need to be localized to many
languages, you may wish to consider the {FriendlyId::SimpleI18n SimpleI18n}
module.
-In order to use this module, your model's translation table must have a slug
-column, and you must set the field +slug+ as translatable with Globalize:
+In order to use this module, your model's table and translation table must both
+have a slug column, and your model must set the +slug+ field as translatable
+with Globalize:
class Post < ActiveRecord::Base
translates :title, :slug

0 comments on commit 7b9a30d

Please sign in to comment.