diff options
| author | hukl <contact@smyck.org> | 2010-01-14 22:21:43 +0100 |
|---|---|---|
| committer | hukl <contact@smyck.org> | 2010-01-14 22:21:43 +0100 |
| commit | 57d1382013c85a7b11ac8ce5e683f6006b12b328 (patch) | |
| tree | 19646c4fa5952fa1cf0a2c874952affa346373f1 /vendor/plugins/globalize2/test/data | |
| parent | 1b86bf5f2e35d1820bfa32d979bcc2d9ff9a9a8e (diff) | |
Updated globalize2 to latest version. Modified existing code accoringly
Diffstat (limited to 'vendor/plugins/globalize2/test/data')
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 @@ | |||
| 1 | en-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 @@ | |||
| 1 | de-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 @@ | |||
| 1 | en-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 @@ | |||
| 1 | en-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 @@ | |||
| 1 | fi-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 | |||
| 6 | class PostTranslation < ActiveRecord::Base | ||
| 7 | def existing_method ; end | ||
| 8 | end | ||
| 9 | |||
| 1 | class Post < ActiveRecord::Base | 10 | class 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" } | ||
| 4 | end | 14 | end |
| 5 | 15 | ||
| 6 | class Blog < ActiveRecord::Base | 16 | class 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 |
| 20 | end | 30 | end |
| 21 | 31 | ||
| 22 | class TranslatedComment < Comment | 32 | class TranslatedComment < Comment |
| 23 | translates :content | 33 | translates :content |
| 24 | end | 34 | end |
| @@ -26,4 +36,16 @@ end | |||
| 26 | class UltraLongModelNameWithoutProper < ActiveRecord::Base | 36 | class UltraLongModelNameWithoutProper < ActiveRecord::Base |
| 27 | translates :subject, :content | 37 | translates :subject, :content |
| 28 | validates_presence_of :subject | 38 | validates_presence_of :subject |
| 29 | end \ No newline at end of file | 39 | end |
| 40 | |||
| 41 | class Reloader < Parent | ||
| 42 | after_create :do_reload | ||
| 43 | |||
| 44 | def do_reload | ||
| 45 | reload | ||
| 46 | end | ||
| 47 | end | ||
| 48 | |||
| 49 | class Validatee < ActiveRecord::Base | ||
| 50 | translates :string | ||
| 51 | end | ||
