Forum: Ruby on Rails Globalize howto

Announcement (2017-05-07): is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see and for other Rails- und Ruby-related community platforms.
Preben H. (Guest)
on 2006-05-08 20:58
Anybody who can help with a step by step howto in using globalize...

I followed this example:

First I've created the database for use in my application:

CREATE TABLE  `products` (
  `id` bigint(20) unsigned NOT NULL auto_increment,
  `name` varchar(12) NOT NULL default '',
  `type` enum('Brace','Belt','Belt SoB') default NULL,
  `collection` tinyint(3) unsigned default NULL,
  `statistics` tinyint(3) unsigned default NULL,
  `quality` enum('One layer grain','One layer split','Grain lined with
grain','Split lined with split','Grain lined with split') default NULL,
default NULL,
  `description` text NOT NULL,
  `comment` text NOT NULL,
  `image` blob,
  PRIMARY KEY  (`id`),
  UNIQUE KEY `id` (`id`),
  KEY `id_2` USING BTREE (`id`)

Then I used a "script/generate scaffold product" to generate a general
template for my beginners application.

Now the description field in the database products should be available
in 3 or more languages. So I found that using Globalize would be a nice

Then I edited the app/models/product.rb file to be:
class Product < ActiveRecord::Base
  translates    :description

then I used the
script/plugin install

script/generate globalize tiny
rake migrate

a lot of stuff happened in my mysql database, but know the question is
how to use the globalize plugin.
They give a test-class in the example given, but I don't really gain any
knowledge from that.

Anybody who can help how to get my "description" multiple language
available - how should the controller look like and how should the view
be handled?

This topic is locked and can not be replied to.