Permalink
Browse files

Document necessary location of slug column (resolves #293)

This adds a point of clarification in the rdoc and inside the globalize module itself to point out that the slug column must be present on the translation table, not the primary model table itself. It also (real friendly-like) corrects some faulty parallelism.
  • Loading branch information...
1 parent 16abf37 commit dc784386ace6ad52c47c9943754e6e85a79ee7a3 @robyurkowski robyurkowski committed Jul 3, 2012
Showing with 5 additions and 5 deletions.
  1. +3 −3 Guide.rdoc
  2. +2 −2 lib/friendly_id/globalize.rb
View
@@ -480,8 +480,8 @@ 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 must have a slug column and set the
-field +slug+ as translable with Globalize:
+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:
class Post < ActiveRecord::Base
translates :title, :slug
@@ -549,4 +549,4 @@ For example:
def move_friendly_id_error_to_name
errors.messages[:name] = errors.messages.delete(:friendly_id)
end
- end
+ end
@@ -13,8 +13,8 @@ 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 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 translation table must have a slug
+column, and you must set the field +slug+ as translatable with Globalize:
class Post < ActiveRecord::Base
translates :title, :slug

0 comments on commit dc78438

Please sign in to comment.