From 57d1382013c85a7b11ac8ce5e683f6006b12b328 Mon Sep 17 00:00:00 2001 From: hukl Date: Thu, 14 Jan 2010 22:21:43 +0100 Subject: Updated globalize2 to latest version. Modified existing code accoringly --- vendor/plugins/globalize2/test/data/models.rb | 26 ++++++++++++++++++++++++-- 1 file changed, 24 insertions(+), 2 deletions(-) (limited to 'vendor/plugins/globalize2/test/data/models.rb') diff --git a/vendor/plugins/globalize2/test/data/models.rb b/vendor/plugins/globalize2/test/data/models.rb index f6dab903..553fca35 100644 --- a/vendor/plugins/globalize2/test/data/models.rb +++ b/vendor/plugins/globalize2/test/data/models.rb @@ -1,6 +1,16 @@ +#require 'ruby2ruby' +#require 'parse_tree' +#require 'parse_tree_extensions' +#require 'pp' + +class PostTranslation < ActiveRecord::Base + def existing_method ; end +end + class Post < ActiveRecord::Base translates :subject, :content validates_presence_of :subject + named_scope :foobar, :conditions => { :title => "foobar" } end class Blog < ActiveRecord::Base @@ -18,7 +28,7 @@ class Comment < ActiveRecord::Base validates_presence_of :content belongs_to :post end - + class TranslatedComment < Comment translates :content end @@ -26,4 +36,16 @@ end class UltraLongModelNameWithoutProper < ActiveRecord::Base translates :subject, :content validates_presence_of :subject -end \ No newline at end of file +end + +class Reloader < Parent + after_create :do_reload + + def do_reload + reload + end +end + +class Validatee < ActiveRecord::Base + translates :string +end -- cgit v1.3