diff options
| author | hukl <contact@smyck.org> | 2009-10-06 20:54:47 +0200 |
|---|---|---|
| committer | hukl <contact@smyck.org> | 2009-10-06 20:54:47 +0200 |
| commit | 2c59d78cde32cfd6f6fcda1f9aa78f94b38e5930 (patch) | |
| tree | 23935202a8c45ae1997739d4173a3d9559e080e5 /vendor/plugins/globalize2/test/data/models.rb | |
| parent | cd6ebe068cf42badc07ea0d803476ef4b1be3177 (diff) | |
updated globalize2
Diffstat (limited to 'vendor/plugins/globalize2/test/data/models.rb')
| -rw-r--r-- | vendor/plugins/globalize2/test/data/models.rb | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/vendor/plugins/globalize2/test/data/models.rb b/vendor/plugins/globalize2/test/data/models.rb new file mode 100644 index 0000000..f6dab90 --- /dev/null +++ b/vendor/plugins/globalize2/test/data/models.rb | |||
| @@ -0,0 +1,29 @@ | |||
| 1 | class Post < ActiveRecord::Base | ||
| 2 | translates :subject, :content | ||
| 3 | validates_presence_of :subject | ||
| 4 | end | ||
| 5 | |||
| 6 | class Blog < ActiveRecord::Base | ||
| 7 | has_many :posts, :order => 'id ASC' | ||
| 8 | end | ||
| 9 | |||
| 10 | class Parent < ActiveRecord::Base | ||
| 11 | translates :content | ||
| 12 | end | ||
| 13 | |||
| 14 | class Child < Parent | ||
| 15 | end | ||
| 16 | |||
| 17 | class Comment < ActiveRecord::Base | ||
| 18 | validates_presence_of :content | ||
| 19 | belongs_to :post | ||
| 20 | end | ||
| 21 | |||
| 22 | class TranslatedComment < Comment | ||
| 23 | translates :content | ||
| 24 | end | ||
| 25 | |||
| 26 | class UltraLongModelNameWithoutProper < ActiveRecord::Base | ||
| 27 | translates :subject, :content | ||
| 28 | validates_presence_of :subject | ||
| 29 | end \ No newline at end of file | ||
