Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Loading…

Clarify globalize slug documentation further #309

Merged
merged 1 commit into from

2 participants

@robyurkowski

In response to @norman's comment here:

The previous change made in dc78438 lost clarity when it assumed parallelism, when in fact the first object had changed with the same commit. Now it should be clearer that the model must set the slug column translatable, not the translation table.

@norman
Owner

Sorry, but it's still not clear. I think it should say something like:

In order to use this module, your model's table and translation table must both have a slug
column, and and your model must set the +slug+ field as translatable with Globalize.

@robyurkowski

I was about to ask this, because I'm currently translating a few tables and things are blowing up without that. I was going by what was said in #293, though I think I understand where we misconnected.

Third time's the charm — I'll correct and squash shortly.

@robyurkowski robyurkowski 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.
7b9a30d
@robyurkowski

There we go.

@norman norman merged commit 4052027 into norman:master
@norman
Owner

Pulled, thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on Jul 4, 2012
  1. @robyurkowski

    Clarify globalize slug documentation further

    robyurkowski authored
    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.
This page is out of date. Refresh to see the latest.
Showing with 6 additions and 4 deletions.
  1. +3 −2 Guide.rdoc
  2. +3 −2 lib/friendly_id/globalize.rb
View
5 Guide.rdoc
@@ -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
View
5 lib/friendly_id/globalize.rb
@@ -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
Something went wrong with that request. Please try again.