summaryrefslogtreecommitdiff
path: root/vendor/plugins/globalize2/test/data/post.rb
blob: 6673dc44656933707f3835e4c810278896dcb565 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
class Post < ActiveRecord::Base
  translates :subject, :content
  validates_presence_of :subject
end

class Blog < ActiveRecord::Base
  has_many :posts, :order => 'id ASC'
end

class Parent < ActiveRecord::Base
  translates :content
end

class Child < Parent
end

class Comment < ActiveRecord::Base
  validates_presence_of :content
  belongs_to :post
end
 
class TranslatedComment < Comment
  translates :content
end