Sha256: a9dd3b9b0126ea04fba2a824c0c62e4839ea665d5dc2941c60f700cb0984e649

Contents?: true

Size: 848 Bytes

Versions: 2

Compression:

Stored size: 848 Bytes

Contents

ActiveRecord::Schema.define(:version => 0) do
  create_table :articles, :force => true do |t|
    t.string :title
  end

  create_table :article_translations, :force => true do |t|
    t.references :article, :null => false
    t.string :locale, :null => false, :limit => 2
    t.string :description
    t.text :text
  end

  create_table :teams, :force => true do |t|
    t.string :title
  end

  create_table :team_translations, :force => true do |t|
    t.references :team, :null => false
    t.string :locale, :null => false, :limit => 2
    t.text :text
  end
end

class ArticleTranslation < ActiveRecord::Base
end

class Article < ActiveRecord::Base
  translations :description, :text, :writer => true
end

class TeamTranslation < ActiveRecord::Base
end

class Team < ActiveRecord::Base
  translations :text, :fallback => true, :nil => nil
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
has_translations-0.3.1 test/schema.rb
has_translations-0.3.0 test/schema.rb