embedded_localization 1.3.0 → 1.4.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,61 @@
1
+ module EmbeddedLocalization
2
+ module Storage
3
+ # ActiveRecord attribute type for a PostgreSQL hstore `i18n` column.
4
+ #
5
+ # hstore is a flat String => String map, so each translation is stored under the key "<locale>.<attribute>",
6
+ # e.g. "de.name" => "Science-Fiction". In Ruby the gem works with the nested Hash {de: {name: "Science-Fiction"}}.
7
+ # Reading and writing the hstore text format is delegated to ActiveRecord's own hstore type.
8
+ class Hstore < ::ActiveRecord::Type::Value
9
+ include ::ActiveModel::Type::Helpers::Mutable
10
+
11
+ SEPARATOR = '.'.freeze
12
+
13
+ def type
14
+ :hstore
15
+ end
16
+
17
+ def deserialize(value)
18
+ nest(hstore.deserialize(value))
19
+ end
20
+
21
+ def serialize(value)
22
+ hstore.serialize(flatten(value))
23
+ end
24
+
25
+ def changed_in_place?(raw_old_value, new_value)
26
+ deserialize(raw_old_value) != new_value
27
+ end
28
+
29
+ private
30
+
31
+ # ActiveRecord registers the hstore type when the PostgreSQL adapter is loaded, i.e. when the connection is
32
+ # established; it is looked up on first use, so a model can be defined before the connection exists.
33
+ def hstore
34
+ @hstore ||= ::ActiveRecord::Type.lookup(:hstore, adapter: :postgresql)
35
+ end
36
+
37
+ # {de: {name: "x"}} => {"de.name" => "x"}
38
+ def flatten(translations)
39
+ return translations unless translations.is_a?(::Hash)
40
+
41
+ translations.each_with_object({}) do |(locale, attributes), flat|
42
+ next unless attributes.is_a?(::Hash)
43
+
44
+ attributes.each { |attr_name, value| flat["#{locale}#{SEPARATOR}#{attr_name}"] = value }
45
+ end
46
+ end
47
+
48
+ # {"de.name" => "x"} => {de: {name: "x"}} ; keys without a separator are ignored
49
+ def nest(flat)
50
+ return flat unless flat.is_a?(::Hash)
51
+
52
+ flat.each_with_object({}) do |(key, value), translations|
53
+ locale, attr_name = key.split(SEPARATOR, 2)
54
+ next unless attr_name
55
+
56
+ (translations[locale.to_sym] ||= {})[attr_name.to_sym] = value
57
+ end
58
+ end
59
+ end
60
+ end
61
+ end
@@ -0,0 +1,25 @@
1
+ module EmbeddedLocalization
2
+ module Storage
3
+ # ActiveRecord attribute type for a json or jsonb `i18n` column.
4
+ #
5
+ # The column holds {"en" => {"name" => "..."}, "de" => {...}}; in Ruby the gem works with Symbol keys on both
6
+ # levels, so this type converts the keys whenever a value comes from the database. Assignment goes through the
7
+ # same conversion: ActiveRecord::Type::Json includes ActiveModel::Type::Helpers::Mutable, whose cast(value) is
8
+ # deserialize(serialize(value)).
9
+ class Json < ::ActiveRecord::Type::Json
10
+ def deserialize(value)
11
+ symbolize_keys(super)
12
+ end
13
+
14
+ private
15
+
16
+ def symbolize_keys(translations)
17
+ return translations unless translations.is_a?(::Hash)
18
+
19
+ translations.each_with_object({}) do |(locale, attributes), result|
20
+ result[locale.to_sym] = attributes.is_a?(::Hash) ? attributes.transform_keys(&:to_sym) : attributes
21
+ end
22
+ end
23
+ end
24
+ end
25
+ end
@@ -1,3 +1,3 @@
1
1
  module EmbeddedLocalization
2
- VERSION = '1.3.0'
2
+ VERSION = '1.4.0'
3
3
  end
@@ -1,11 +1,16 @@
1
+ require "active_record"
1
2
  require "embedded_localization/version"
2
- require 'extensions/hash'
3
3
 
4
4
  module EmbeddedLocalization
5
5
  autoload :ActiveRecord, 'embedded_localization/active_record'
6
+
7
+ # ActiveRecord attribute types for the `i18n` column when it is not a YAML text column
8
+ module Storage
9
+ autoload :Json, 'embedded_localization/storage/json'
10
+ autoload :Hstore, 'embedded_localization/storage/hstore'
11
+ end
6
12
  end
7
13
 
8
- # we're assuming for now only to be used with ActiveRecord 3, which is auto-required above
9
14
  ActiveRecord::Base.extend(EmbeddedLocalization::ActiveRecord::ActMacro)
10
15
 
11
16
  #-
@@ -29,4 +34,3 @@ ActiveRecord::Base.extend(EmbeddedLocalization::ActiveRecord::ActMacro)
29
34
 
30
35
  # not as general:
31
36
  # I18n::Backend::Simple.send(:include, I18n::Backend::Fallbacks)
32
-
metadata CHANGED
@@ -1,14 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: embedded_localization
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.3.0
4
+ version: 1.4.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Tilo Sloboda
8
- autorequire:
9
8
  bindir: bin
10
9
  cert_chain: []
11
- date: 2024-11-13 00:00:00.000000000 Z
10
+ date: 1980-01-02 00:00:00.000000000 Z
12
11
  dependencies:
13
12
  - !ruby/object:Gem::Dependency
14
13
  name: rspec
@@ -24,6 +23,20 @@ dependencies:
24
23
  - - ">="
25
24
  - !ruby/object:Gem::Version
26
25
  version: '0'
26
+ - !ruby/object:Gem::Dependency
27
+ name: simplecov
28
+ requirement: !ruby/object:Gem::Requirement
29
+ requirements:
30
+ - - ">="
31
+ - !ruby/object:Gem::Version
32
+ version: '0'
33
+ type: :development
34
+ prerelease: false
35
+ version_requirements: !ruby/object:Gem::Requirement
36
+ requirements:
37
+ - - ">="
38
+ - !ruby/object:Gem::Version
39
+ version: '0'
27
40
  - !ruby/object:Gem::Dependency
28
41
  name: activerecord
29
42
  requirement: !ruby/object:Gem::Requirement
@@ -66,17 +79,16 @@ dependencies:
66
79
  - - ">="
67
80
  - !ruby/object:Gem::Version
68
81
  version: '0'
69
- description: 'Rails I18n: Embedded_Localization for ActiveRecord is very lightweight,
70
- and allows you to transparently store translations of attributes right inside each
71
- record -- no extra database tables needed to store the localization data!'
82
+ description: 'Rails I18n: a very lightweight tool to allow you to transparently store
83
+ multiple translations of attributes directly inside each DB record -- no extra database
84
+ tables needed to store the localization data! All translations of a record live
85
+ in one column: a YAML text column, a json/jsonb column, or a PostgreSQL hstore column.'
72
86
  email:
73
87
  - tilo.sloboda@gmail.com
74
88
  executables: []
75
89
  extensions: []
76
90
  extra_rdoc_files: []
77
91
  files:
78
- - ".gitignore"
79
- - ".travis.yml"
80
92
  - CHANGELOG.md
81
93
  - Gemfile
82
94
  - README.md
@@ -87,14 +99,9 @@ files:
87
99
  - lib/embedded_localization/active_record/act_macro.rb
88
100
  - lib/embedded_localization/active_record/class_methods.rb
89
101
  - lib/embedded_localization/active_record/instance_methods.rb
102
+ - lib/embedded_localization/storage/hstore.rb
103
+ - lib/embedded_localization/storage/json.rb
90
104
  - lib/embedded_localization/version.rb
91
- - lib/extensions/hash.rb
92
- - spec/embedded_localization/native_column_spec.rb
93
- - spec/embedded_localization/simple_model_spec.rb
94
- - spec/models.rb
95
- - spec/schema.rb
96
- - spec/spec.opts
97
- - spec/spec_helper.rb
98
105
  homepage: https://github.com/tilo/embedded_localization
99
106
  licenses:
100
107
  - MIT
@@ -102,7 +109,7 @@ metadata:
102
109
  homepage_uri: https://github.com/tilo/embedded_localization
103
110
  source_code_uri: https://github.com/tilo/embedded_localization
104
111
  changelog_uri: https://github.com/tilo/embedded_localization/blob/main/CHANGELOG.md
105
- post_install_message:
112
+ bug_tracker_uri: https://github.com/tilo/embedded_localization/issues
106
113
  rdoc_options: []
107
114
  require_paths:
108
115
  - lib
@@ -117,14 +124,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
117
124
  - !ruby/object:Gem::Version
118
125
  version: '0'
119
126
  requirements: []
120
- rubygems_version: 3.2.3
121
- signing_key:
127
+ rubygems_version: 4.0.17
122
128
  specification_version: 4
123
129
  summary: 'Rails I18n: library for embedded ActiveRecord model/data translation'
124
- test_files:
125
- - spec/embedded_localization/native_column_spec.rb
126
- - spec/embedded_localization/simple_model_spec.rb
127
- - spec/models.rb
128
- - spec/schema.rb
129
- - spec/spec.opts
130
- - spec/spec_helper.rb
130
+ test_files: []
data/.gitignore DELETED
@@ -1,7 +0,0 @@
1
- #*#
2
- *~
3
- *.bak
4
- *.gem
5
- .bundle
6
- Gemfile.lock
7
- pkg/*
data/.travis.yml DELETED
@@ -1,32 +0,0 @@
1
- language: ruby
2
- bundler_args: --without development
3
- before_install:
4
- - gem install bundler
5
- - gem update --system
6
-
7
- matrix:
8
- include:
9
- - rvm: 2.2.10
10
- - rvm: 2.3.8
11
- - rvm: 2.4.10
12
- - rvm: 2.5.8
13
- - rvm: 2.6.9
14
- - rvm: 2.7.5
15
- - rvm: 3.0.3
16
- - rvm: 3.1.0
17
- - rvm: 3.2.0
18
- - rvm: 3.3.0
19
- - rvm: jruby-9.2.19.0
20
- - rvm: jruby-9.3.3.0
21
- - jruby-head
22
- - mruby
23
- - rubinius
24
- - ree
25
-
26
- env:
27
- - JRUBY_OPTS="--server -Xcompile.invokedynamic=false -J-XX:+TieredCompilation -J-XX:TieredStopAtLevel=1 -J-noverify -J-Xms512m -J-Xmx1024m"
28
- - rvm: ruby-head
29
-
30
- branches:
31
- only:
32
- - master
@@ -1,7 +0,0 @@
1
- class Hash
2
- def self.zip(keys,values) # from Facets of Ruby library, CREDIT: Trans, Ara T. Howard
3
- h = {}
4
- keys.size.times{ |i| h[ keys[i] ] = values[i] }
5
- h
6
- end
7
- end
@@ -1,191 +0,0 @@
1
- # encoding: utf-8
2
- require 'spec_helper'
3
-
4
- I18n.locale = :en
5
-
6
- # e.g. the model "Movie" has :title as a translated field,
7
- # but also has :title as a native attribute for the model.
8
-
9
- describe 'model has translated field with attribute of that same name' do
10
- let(:movie){ Movie.new }
11
-
12
- describe "basic things that need to work" do
13
-
14
- it 'reports it translates' do
15
- Movie.translates?.should be_truthy
16
- end
17
-
18
- it 'correctly reports the list of translated_attributes' do
19
- Movie.translated_attributes.sort.should eq [:description, :title]
20
- end
21
-
22
- it 'correctly reports the list of translated_attribute_names' do
23
- Movie.translated_attribute_names.sort.should eq [:description, :title]
24
- end
25
-
26
- it 'correcty shows the translated attribute as translated' do
27
- Movie.translated?(:title).should be_truthy
28
- Movie.translated?(:description).should be_truthy
29
- end
30
-
31
- it 'correcty shows not translated attribute' do
32
- Movie.translated?(:other).should be_falsy
33
- end
34
- end
35
-
36
- describe "new DB records" do
37
-
38
- it 'correctly reports translated_locales for new record' do
39
- movie.translated_locales.should eq [I18n.default_locale]
40
- end
41
-
42
- it 'correctly reports translation_missing for new record' do
43
- movie.translation_missing.should be_truthy
44
- end
45
-
46
- it 'creates the accessor methods' do
47
- movie.methods.should include(:title)
48
- movie.methods.should include(:title=)
49
- movie.methods.should include(:description)
50
- movie.methods.should include(:description=)
51
- end
52
-
53
- it 'correctly reports translated field for new record for default locale' do
54
- movie.title.should be_nil
55
- movie.description.should be_nil
56
- movie.description( I18n.default_locale ).should be_nil
57
- end
58
-
59
- it 'correctly reports translated field for new record for other locale' do
60
- movie.title(:ko).should be_nil
61
- movie.description(:de).should be_nil
62
- end
63
-
64
- it 'correctly reports translation_coverage for new record' do
65
- movie.translation_coverage.should eq Hash.new
66
- end
67
-
68
- it 'correctly reports translation_goverate for attributes of new record' do
69
- movie.translation_coverage(:title).should eq []
70
- movie.translation_coverage(:description).should eq []
71
- end
72
-
73
- it 'translated_coverage returns nil for not-translated attributes' do
74
- movie.translation_coverage(:other).should be_nil
75
- end
76
-
77
- it 'correctly reports translation_missing for new record' do
78
- movie.translation_missing.should == {:description=>[:en], :title=>[:en]}
79
- movie.translation_missing(:title).should eq [:en]
80
- movie.translation_missing(:description).should eq [:en]
81
- end
82
- end
83
-
84
-
85
- describe "DB record with pre-set fields" do
86
- let(:title_en){ "Blade Runner" }
87
- let(:blade_runner){ Movie.new(:title => title_en) }
88
-
89
- it 'correctly shows the attribute for new record' do
90
- blade_runner.title.should eq title_en
91
- end
92
- end
93
-
94
-
95
- describe "updated DB record" do
96
- let(:title_en){ "Blade Runner" }
97
- let(:title_ru){'аЕЦСЫХИ ОН КЕГБХЧ'}
98
- let(:title_tr){"Ölüm takibi"}
99
- let(:title_de){"Der Blade Runner"}
100
- let(:blade_runner){ Movie.new(:title => title_en) }
101
-
102
- describe 'updating just default locale' do
103
-
104
- before :each do
105
- movie.title = title_en
106
- movie.description = "an awesome movie"
107
- movie.save
108
- movie.reload
109
- end
110
-
111
- it 'correctly reports the translated_locales' do
112
- movie.translated_locales.should eq [:en]
113
- end
114
-
115
- # when setting all fields in the default locale's languange:
116
- it 'correctly reports translation_missing for updated record' do
117
- movie.translation_missing.should eq Hash.new
118
- end
119
-
120
- it 'correctly reports translation_missing for attributes' do
121
- movie.translation_missing(:title).should eq nil
122
- movie.translation_missing(:description).should eq nil
123
- end
124
-
125
- it 'correctly reports translated_coverage for updated record' do
126
- movie.translation_coverage.should == {:title=>[:en], :description=>[:en]}
127
- end
128
-
129
- it 'correctly reports translated_coverage for attributes' do
130
- movie.translation_coverage(:title).should eq [:en]
131
- movie.translation_coverage(:description).should eq [:en]
132
- end
133
- end
134
-
135
- describe 'updating other locales' do
136
- before :each do
137
- movie.title = title_en
138
- movie.description = "an awesome movie"
139
- I18n.locale = :ru
140
- movie.title = title_ru
141
- movie.set_localized_attribute(:title , :tr, title_tr)
142
- I18n.locale = :de
143
- movie.description = "ein grossartiger Film"
144
- I18n.locale = I18n.default_locale # MAKE SURE you switch back to your default loale if you tweak it
145
- movie.save
146
- movie.reload
147
- end
148
-
149
- it 'correctly reports the translated_locales' do
150
- movie.translated_locales.should eq [:en, :ru, :tr, :de]
151
- end
152
-
153
- it 'can assign the translated field' do
154
- movie.title = title_en
155
- movie.save.should be_truthy
156
- movie.title.should eq title_en
157
- movie.title(:en).should eq title_en
158
- end
159
-
160
- # when setting all fields in additional languanges:
161
- it 'correctly reports values for updated record via attr(:locale)' do
162
- movie.title(:tr).should eq title_tr
163
- end
164
-
165
- it 'correctly reports values for updated record via getter' do
166
- movie.get_localized_attribute(:title, :ru).should eq title_ru
167
- end
168
-
169
- it 'correctly reports translation_coverage for updated record' do
170
- # what values are actually present
171
- movie.translation_coverage.should == {:title=>[:en, :ru, :tr], :description=>[:en, :de]}
172
- end
173
-
174
- it 'correctly reports translation_coverage for attributes' do
175
- movie.translation_coverage(:title).should eq [:en,:ru,:tr]
176
- movie.translation_coverage(:description).should eq [:en,:de]
177
- end
178
-
179
- it 'correctly reports translation_missing for updated record' do
180
- # what values are missing
181
- movie.translation_missing.should == {:description=>[:ru, :tr], :title=>[:de]}
182
- end
183
-
184
- it 'correctly reports translation_missing for attributes' do
185
- movie.translation_missing(:title).should eq [:de]
186
- movie.translation_missing(:description).should eq [:ru,:tr]
187
- end
188
- end
189
-
190
- end
191
- end
@@ -1,190 +0,0 @@
1
- # encoding: utf-8
2
- require 'spec_helper'
3
-
4
- I18n.locale = :en
5
-
6
- # e.g. the model "Genre" has :name as a translated field,
7
- # but does not have :name as a native attribute for the model.
8
- # It is only defined as a virtual attribute in the :i18n hash.
9
-
10
- describe 'model has translated field without attribute of that same name' do
11
- let(:genre){ Genre.new }
12
-
13
- describe "basic things that need to work" do
14
-
15
- it 'reports it translates' do
16
- Genre.translates?.should be_truthy
17
- end
18
-
19
- it 'correctly reports the list of translated_attributes' do
20
- Genre.translated_attributes.sort.should eq [:description, :name]
21
- end
22
-
23
- it 'correctly reports the list of translated_attribute_names' do
24
- Genre.translated_attribute_names.sort.should eq [:description, :name]
25
- end
26
-
27
- it 'correcty shows the translated attribute as translated' do
28
- Genre.translated?(:name).should be_truthy
29
- Genre.translated?(:description).should be_truthy
30
- end
31
-
32
- it 'correcty shows not translated attribute' do
33
- Genre.translated?(:other).should be_falsy
34
- end
35
- end
36
-
37
- describe "new DB records" do
38
-
39
- it 'correctly reports translated_locales for new record' do
40
- genre.translated_locales.should eq [I18n.default_locale]
41
- end
42
-
43
- it 'correctly reports translation_missing for new record' do
44
- genre.translation_missing.should be_truthy
45
- end
46
-
47
- it 'creates the accessor methods' do
48
- genre.methods.should include(:name)
49
- genre.methods.should include(:name=)
50
- genre.methods.should include(:description)
51
- genre.methods.should include(:description=)
52
- end
53
-
54
- it 'correctly reports translated field for new record for default locale' do
55
- genre.name.should be_nil
56
- genre.description.should be_nil
57
- genre.description( I18n.default_locale ).should be_nil
58
- end
59
-
60
- it 'correctly reports translated field for new record for other locale' do
61
- genre.name(:ko).should be_nil
62
- genre.description(:de).should be_nil
63
- end
64
-
65
- it 'correctly reports translation_coverage for new record' do
66
- genre.translation_coverage.should eq Hash.new
67
- end
68
-
69
- it 'correctly reports translation_goverate for attributes of new record' do
70
- genre.translation_coverage(:name).should eq []
71
- genre.translation_coverage(:description).should eq []
72
- end
73
-
74
- it 'translated_coverage returns nil for not-translated attributes' do
75
- genre.translation_coverage(:other).should be_nil
76
- end
77
-
78
- it 'correctly reports translation_missing for new record' do
79
- genre.translation_missing.should == {:description=>[:en], :name=>[:en]}
80
- genre.translation_missing(:name).should eq [:en]
81
- genre.translation_missing(:description).should eq [:en]
82
- end
83
- end
84
-
85
- describe "DB record with pre-set fields" do
86
- let(:genre_name_en){"Science Fiction"}
87
- let(:scifi){ Genre.new(:name => genre_name_en) }
88
-
89
- it 'correctly shows the attribute for new record' do
90
- scifi.name.should eq genre_name_en
91
- end
92
- end
93
-
94
- describe "updated DB record" do
95
- let(:genre_name_en){"Science Fiction"}
96
- let(:genre_name_jp){"サイエンスフィクション"}
97
- let(:genre_name_ko){"공상 과학 소설"}
98
- let(:scifi){ Genre.new(:name => genre_name_en) }
99
-
100
- describe 'updating just default locale' do
101
-
102
- before :each do
103
- genre.name = genre_name_en
104
- genre.description = "an awesome genre"
105
- genre.save
106
- genre.reload
107
- end
108
-
109
- it 'correctly reports the translated_locales' do
110
- genre.translated_locales.should eq [:en]
111
- end
112
-
113
- # when setting all fields in the default locale's languange:
114
- it 'correctly reports translation_missing for updated record' do
115
- genre.translation_missing.should eq Hash.new
116
- end
117
-
118
- it 'correctly reports translation_missing for attributes' do
119
- genre.translation_missing(:name).should eq nil
120
- genre.translation_missing(:description).should eq nil
121
- end
122
-
123
- it 'correctly reports translated_coverage for updated record' do
124
- genre.translation_coverage.should == {:name=>[:en], :description=>[:en]}
125
- end
126
-
127
- it 'correctly reports translated_coverage for attributes' do
128
- genre.translation_coverage(:name).should eq [:en]
129
- genre.translation_coverage(:description).should eq [:en]
130
- end
131
- end
132
-
133
-
134
- describe 'updating other locales' do
135
- before :each do
136
- genre.name = genre_name_en
137
- genre.description = "an awesome genre"
138
- I18n.locale = :jp
139
- genre.name = genre_name_jp
140
- genre.set_localized_attribute(:name, :ko, genre_name_ko)
141
- I18n.locale = :de
142
- genre.description = "ein grossartiges Genre"
143
- I18n.locale = I18n.default_locale # MAKE SURE you switch back to your default locale if you tweak it
144
- genre.save
145
- genre.reload
146
- end
147
-
148
- it 'correctly reports the translated_locales' do
149
- genre.translated_locales.should eq [:en, :jp, :ko, :de]
150
- end
151
-
152
- it 'can assign the translated field' do
153
- genre.name = genre_name_en
154
- genre.save.should be_truthy
155
- genre.name.should eq genre_name_en
156
- genre.name(:en).should eq genre_name_en
157
- end
158
-
159
- # when setting all fields in additional languanges:
160
- it 'correctly reports values for updated record via attr(:locale)' do
161
- genre.name(:ko).should eq genre_name_ko
162
- end
163
-
164
- it 'correctly reports values for updated record via getter' do
165
- genre.get_localized_attribute(:name, :jp).should eq genre_name_jp
166
- end
167
-
168
- it 'correctly reports translation_coverage for updated record' do
169
- # what values are actually present
170
- genre.translation_coverage.should == {:name=>[:en, :jp, :ko], :description=>[:en, :de]}
171
- end
172
-
173
- it 'correctly reports translation_coverage for attributes' do
174
- genre.translation_coverage(:name).should eq [:en, :jp, :ko]
175
- genre.translation_coverage(:description).should eq [:en,:de]
176
- end
177
-
178
- it 'correctly reports translation_missing for updated record' do
179
- # what values are missing
180
- genre.translation_missing.should == {:description=>[:jp, :ko], :name=>[:de]}
181
- end
182
-
183
- it 'correctly reports translation_missing for attributes' do
184
- genre.translation_missing(:name).should eq [:de]
185
- genre.translation_missing(:description).should eq [:jp, :ko]
186
- end
187
- end
188
-
189
- end
190
- end
data/spec/models.rb DELETED
@@ -1,7 +0,0 @@
1
- class Genre < ActiveRecord::Base
2
- translates :name, :description
3
- end
4
-
5
- class Movie < ActiveRecord::Base
6
- translates :title, :description
7
- end
data/spec/schema.rb DELETED
@@ -1,18 +0,0 @@
1
- ActiveRecord::Schema.define do
2
- self.verbose = false
3
-
4
- create_table :genres, :force => true do |t|
5
- t.text :i18n
6
-
7
- t.string :other
8
- t.timestamps
9
- end
10
-
11
- create_table :movies, :force => true do |t|
12
- t.string :title
13
- t.text :i18n
14
-
15
- t.string :other
16
- t.timestamps
17
- end
18
- end
data/spec/spec.opts DELETED
@@ -1,2 +0,0 @@
1
- --color
2
- --backtrace