summaryrefslogtreecommitdiff
path: root/vendor/plugins/globalize2/test/data
diff options
context:
space:
mode:
authorhukl <contact@smyck.org>2010-01-14 22:21:43 +0100
committerhukl <contact@smyck.org>2010-01-14 22:21:43 +0100
commit57d1382013c85a7b11ac8ce5e683f6006b12b328 (patch)
tree19646c4fa5952fa1cf0a2c874952affa346373f1 /vendor/plugins/globalize2/test/data
parent1b86bf5f2e35d1820bfa32d979bcc2d9ff9a9a8e (diff)
Updated globalize2 to latest version. Modified existing code accoringly
Diffstat (limited to 'vendor/plugins/globalize2/test/data')
-rw-r--r--vendor/plugins/globalize2/test/data/locale/all.yml2
-rw-r--r--vendor/plugins/globalize2/test/data/locale/de-DE.yml2
-rw-r--r--vendor/plugins/globalize2/test/data/locale/en-US.yml2
-rw-r--r--vendor/plugins/globalize2/test/data/locale/en-US/module.yml2
-rw-r--r--vendor/plugins/globalize2/test/data/locale/fi-FI/module.yml2
-rw-r--r--vendor/plugins/globalize2/test/data/locale/root.yml0
-rw-r--r--vendor/plugins/globalize2/test/data/models.rb26
7 files changed, 24 insertions, 12 deletions
diff --git a/vendor/plugins/globalize2/test/data/locale/all.yml b/vendor/plugins/globalize2/test/data/locale/all.yml
deleted file mode 100644
index ee4fb4a..0000000
--- a/vendor/plugins/globalize2/test/data/locale/all.yml
+++ /dev/null
@@ -1,2 +0,0 @@
1en-US:
2 from-all-file: From the "all" file.
diff --git a/vendor/plugins/globalize2/test/data/locale/de-DE.yml b/vendor/plugins/globalize2/test/data/locale/de-DE.yml
deleted file mode 100644
index d4c468e..0000000
--- a/vendor/plugins/globalize2/test/data/locale/de-DE.yml
+++ /dev/null
@@ -1,2 +0,0 @@
1de-DE:
2 from-locale-file: Aus der Locale Datei. \ No newline at end of file
diff --git a/vendor/plugins/globalize2/test/data/locale/en-US.yml b/vendor/plugins/globalize2/test/data/locale/en-US.yml
deleted file mode 100644
index 866b171..0000000
--- a/vendor/plugins/globalize2/test/data/locale/en-US.yml
+++ /dev/null
@@ -1,2 +0,0 @@
1en-US:
2 from-locale-file: From the locale file.
diff --git a/vendor/plugins/globalize2/test/data/locale/en-US/module.yml b/vendor/plugins/globalize2/test/data/locale/en-US/module.yml
deleted file mode 100644
index 6655e9b..0000000
--- a/vendor/plugins/globalize2/test/data/locale/en-US/module.yml
+++ /dev/null
@@ -1,2 +0,0 @@
1en-US:
2 from-locale-dir: From the locale directory.
diff --git a/vendor/plugins/globalize2/test/data/locale/fi-FI/module.yml b/vendor/plugins/globalize2/test/data/locale/fi-FI/module.yml
deleted file mode 100644
index 62d00b1..0000000
--- a/vendor/plugins/globalize2/test/data/locale/fi-FI/module.yml
+++ /dev/null
@@ -1,2 +0,0 @@
1fi-FI:
2 from-locale-dir: Locale hakemistosta. \ No newline at end of file
diff --git a/vendor/plugins/globalize2/test/data/locale/root.yml b/vendor/plugins/globalize2/test/data/locale/root.yml
deleted file mode 100644
index e69de29..0000000
--- a/vendor/plugins/globalize2/test/data/locale/root.yml
+++ /dev/null
diff --git a/vendor/plugins/globalize2/test/data/models.rb b/vendor/plugins/globalize2/test/data/models.rb
index f6dab90..553fca3 100644
--- a/vendor/plugins/globalize2/test/data/models.rb
+++ b/vendor/plugins/globalize2/test/data/models.rb
@@ -1,6 +1,16 @@
1#require 'ruby2ruby'
2#require 'parse_tree'
3#require 'parse_tree_extensions'
4#require 'pp'
5
6class PostTranslation < ActiveRecord::Base
7 def existing_method ; end
8end
9
1class Post < ActiveRecord::Base 10class Post < ActiveRecord::Base
2 translates :subject, :content 11 translates :subject, :content
3 validates_presence_of :subject 12 validates_presence_of :subject
13 named_scope :foobar, :conditions => { :title => "foobar" }
4end 14end
5 15
6class Blog < ActiveRecord::Base 16class Blog < ActiveRecord::Base
@@ -18,7 +28,7 @@ class Comment < ActiveRecord::Base
18 validates_presence_of :content 28 validates_presence_of :content
19 belongs_to :post 29 belongs_to :post
20end 30end
21 31
22class TranslatedComment < Comment 32class TranslatedComment < Comment
23 translates :content 33 translates :content
24end 34end
@@ -26,4 +36,16 @@ end
26class UltraLongModelNameWithoutProper < ActiveRecord::Base 36class UltraLongModelNameWithoutProper < ActiveRecord::Base
27 translates :subject, :content 37 translates :subject, :content
28 validates_presence_of :subject 38 validates_presence_of :subject
29end \ No newline at end of file 39end
40
41class Reloader < Parent
42 after_create :do_reload
43
44 def do_reload
45 reload
46 end
47end
48
49class Validatee < ActiveRecord::Base
50 translates :string
51end