annotate (2.4.1.beta)gemを使用してglobalize3 (0.2.0)、変換するモデルに変換されたプロパティを出力することはできますか?
そのようPostに作成された移行が生成された場合
class CreatePosts < ActiveRecord::Migration
def up
create_table :posts do |t|
t.timestamps
end
Post.create_translation_table! title: :string, text: :text
end
def down
drop_table :posts
Post.drop_translation_table!
end
end
とそれに対応するクラスは次のようになります
class Post < ActiveRecord::Base
attr_accessible :title, :text
translates :title, :text
end
:titleと:text属性はテーブルではなくpostsテーブルにあるのでpost_translations、実行すると
$ annotate --position before
Postこれらはモデルの出力には含まれていません。
# == Schema Information
#
# Table name: posts
#
# id :integer not null, primary key
# created_at :datetime not null
# updated_at :datetime not null
#
class Post < ActiveRecord::Base
...
注釈を生成するたびに手動で入力せずにこれらの属性を含める方法はありますか?