diff options
author | Louise Crow <louise.crow@gmail.com> | 2013-06-04 15:03:02 +0100 |
---|---|---|
committer | Louise Crow <louise.crow@gmail.com> | 2013-06-04 15:03:02 +0100 |
commit | a885764b65916020d9182073b38f6951a20d4b8c (patch) | |
tree | 0988651c144b65a8e46b28b376b2e72a5947d934 /vendor/plugins/globalize2/test/data | |
parent | eb1c465162420ad62c16dccb983cb28aa89a4639 (diff) | |
parent | a919141992a40599f99b32bd4a8312a0009f3f7a (diff) |
Merge branch 'release/0.11'0.11.0.3
Diffstat (limited to 'vendor/plugins/globalize2/test/data')
-rw-r--r-- | vendor/plugins/globalize2/test/data/models.rb | 56 | ||||
-rw-r--r-- | vendor/plugins/globalize2/test/data/no_globalize_schema.rb | 11 | ||||
-rw-r--r-- | vendor/plugins/globalize2/test/data/schema.rb | 55 |
3 files changed, 0 insertions, 122 deletions
diff --git a/vendor/plugins/globalize2/test/data/models.rb b/vendor/plugins/globalize2/test/data/models.rb deleted file mode 100644 index 5408d6e23..000000000 --- a/vendor/plugins/globalize2/test/data/models.rb +++ /dev/null @@ -1,56 +0,0 @@ -#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 - -class User < ActiveRecord::Base - translates :name - validates_presence_of :name, :email -end diff --git a/vendor/plugins/globalize2/test/data/no_globalize_schema.rb b/vendor/plugins/globalize2/test/data/no_globalize_schema.rb deleted file mode 100644 index 379455ddb..000000000 --- a/vendor/plugins/globalize2/test/data/no_globalize_schema.rb +++ /dev/null @@ -1,11 +0,0 @@ -# This schema creates tables without columns for the translated fields -ActiveRecord::Schema.define do - create_table :blogs, :force => true do |t| - t.string :name - end - - create_table :posts, :force => true do |t| - t.references :blog - end -end - diff --git a/vendor/plugins/globalize2/test/data/schema.rb b/vendor/plugins/globalize2/test/data/schema.rb deleted file mode 100644 index 910dd0855..000000000 --- a/vendor/plugins/globalize2/test/data/schema.rb +++ /dev/null @@ -1,55 +0,0 @@ -ActiveRecord::Schema.define do - create_table :blogs, :force => true do |t| - t.string :description - end - - create_table :posts, :force => true do |t| - t.references :blog - end - - create_table :post_translations, :force => true do |t| - t.string :locale - t.references :post - t.string :subject - t.text :content - end - - create_table :parents, :force => true do |t| - end - - create_table :parent_translations, :force => true do |t| - t.string :locale - t.references :parent - t.text :content - t.string :type - end - - create_table :comments, :force => true do |t| - t.references :post - end - - create_table :comment_translations, :force => true do |t| - t.string :locale - t.references :comment - t.string :subject - t.text :content - end - - create_table :validatees, :force => true do |t| - end - - create_table :validatee_translations, :force => true do |t| - t.string :locale - t.references :validatee - t.string :string - end - - create_table :users, :force => true do |t| - t.string :email - end - - create_table :users_translations, :force => true do |t| - t.references :user - t.string :name - end -end |