blob: 553fca355e0dc902b225b18b2b6f513b71fb0911 (
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
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
|
#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
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
class UltraLongModelNameWithoutProper < ActiveRecord::Base
translates :subject, :content
validates_presence_of :subject
end
class Reloader < Parent
after_create :do_reload
def do_reload
reload
end
end
class Validatee < ActiveRecord::Base
translates :string
end
|