]> git.openstreetmap.org Git - rails.git/blobdiff - vendor/plugins/globalize2/test/data/post.rb
Add Globalize2 so that we get some nice fall backs to other languages when a translat...
[rails.git] / vendor / plugins / globalize2 / test / data / post.rb
diff --git a/vendor/plugins/globalize2/test/data/post.rb b/vendor/plugins/globalize2/test/data/post.rb
new file mode 100644 (file)
index 0000000..6673dc4
--- /dev/null
@@ -0,0 +1,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
\ No newline at end of file