Sha256: afe7bc0292a1851d6f5280272d639d4b251d27c469e4a6e10bd6c03379bee4f2
Contents?: true
Size: 980 Bytes
Versions: 2
Compression:
Stored size: 980 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 #attr_accessible :description, :text end class Article < ActiveRecord::Base include HasTranslations::ModelAdditions has_translations :description, :text, :writer => true end class TeamTranslation < ActiveRecord::Base end class Team < ActiveRecord::Base include HasTranslations::ModelAdditions has_translations :text, :fallback => true, :nil => nil end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
has_translations-1.1.0 | test/schema.rb |
has_translations-1.0.0 | test/schema.rb |