lolita-translation 0.3.0 → 0.3.1

Sign up to get free protection for your applications and to get access to all the features.
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.3.0
1
+ 0.3.1
@@ -16,6 +16,7 @@ module Lolita
16
16
  end
17
17
 
18
18
  class << self
19
+ # Determine whether tab is translatable. When there is one or more fields in tab, that are defined with #translates.
19
20
  def translatable?(tab)
20
21
  fields = tab.fields.reject{|field|
21
22
  field.dbi!=tab.dbi
@@ -24,6 +25,7 @@ module Lolita
24
25
  tab.dbi.klass.respond_to?(:translations) && (fields.map(&:name) & tab.dbi.klass.translation_attrs).any?
25
26
  end
26
27
 
28
+ # Create nested form configuration for views.
27
29
  def create_translations_nested_form(resource,tab)
28
30
  resource.build_nested_translations
29
31
  nested_form = Lolita::Configuration::NestedForm.new(tab,:translations)
@@ -104,8 +104,8 @@ module Lolita
104
104
  config = self
105
105
  @klass.class_eval do
106
106
 
107
- class_attribute :has_translation_options
108
- self.has_translation_options = config.options
107
+ class_attribute :has_translations_options
108
+ self.has_translations_options = config.options
109
109
 
110
110
  class_attribute :columns_has_translations
111
111
  self.columns_has_translations = (columns rescue []).collect{|col| col if config.attrs.include?(col.name.to_sym)}.compact
@@ -5,11 +5,11 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = "lolita-translation"
8
- s.version = "0.3.0"
8
+ s.version = "0.3.1"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
11
  s.authors = ["ITHouse", "Gatis Tomsons", "Arturs Meisters"]
12
- s.date = "2011-11-11"
12
+ s.date = "2011-11-15"
13
13
  s.description = "Translates models in Lolita"
14
14
  s.email = "support@ithouse.lv"
15
15
  s.extra_rdoc_files = [
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: lolita-translation
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.0
4
+ version: 0.3.1
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -11,11 +11,11 @@ authors:
11
11
  autorequire:
12
12
  bindir: bin
13
13
  cert_chain: []
14
- date: 2011-11-11 00:00:00.000000000Z
14
+ date: 2011-11-15 00:00:00.000000000Z
15
15
  dependencies:
16
16
  - !ruby/object:Gem::Dependency
17
17
  name: lolita
18
- requirement: &84276570 !ruby/object:Gem::Requirement
18
+ requirement: &83328310 !ruby/object:Gem::Requirement
19
19
  none: false
20
20
  requirements:
21
21
  - - ! '>='
@@ -23,10 +23,10 @@ dependencies:
23
23
  version: 3.2.0.rc.3
24
24
  type: :runtime
25
25
  prerelease: false
26
- version_requirements: *84276570
26
+ version_requirements: *83328310
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: shoulda
29
- requirement: &84276210 !ruby/object:Gem::Requirement
29
+ requirement: &83328010 !ruby/object:Gem::Requirement
30
30
  none: false
31
31
  requirements:
32
32
  - - ! '>='
@@ -34,10 +34,10 @@ dependencies:
34
34
  version: '0'
35
35
  type: :development
36
36
  prerelease: false
37
- version_requirements: *84276210
37
+ version_requirements: *83328010
38
38
  - !ruby/object:Gem::Dependency
39
39
  name: bundler
40
- requirement: &84275880 !ruby/object:Gem::Requirement
40
+ requirement: &83327690 !ruby/object:Gem::Requirement
41
41
  none: false
42
42
  requirements:
43
43
  - - ~>
@@ -45,10 +45,10 @@ dependencies:
45
45
  version: 1.0.0
46
46
  type: :development
47
47
  prerelease: false
48
- version_requirements: *84275880
48
+ version_requirements: *83327690
49
49
  - !ruby/object:Gem::Dependency
50
50
  name: jeweler
51
- requirement: &84275520 !ruby/object:Gem::Requirement
51
+ requirement: &83327390 !ruby/object:Gem::Requirement
52
52
  none: false
53
53
  requirements:
54
54
  - - ~>
@@ -56,10 +56,10 @@ dependencies:
56
56
  version: 1.5.2
57
57
  type: :development
58
58
  prerelease: false
59
- version_requirements: *84275520
59
+ version_requirements: *83327390
60
60
  - !ruby/object:Gem::Dependency
61
61
  name: rcov
62
- requirement: &84275140 !ruby/object:Gem::Requirement
62
+ requirement: &83327100 !ruby/object:Gem::Requirement
63
63
  none: false
64
64
  requirements:
65
65
  - - ! '>='
@@ -67,7 +67,7 @@ dependencies:
67
67
  version: '0'
68
68
  type: :development
69
69
  prerelease: false
70
- version_requirements: *84275140
70
+ version_requirements: *83327100
71
71
  description: Translates models in Lolita
72
72
  email: support@ithouse.lv
73
73
  executables: []
@@ -119,7 +119,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
119
119
  version: '0'
120
120
  segments:
121
121
  - 0
122
- hash: -628896687
122
+ hash: -602776685
123
123
  required_rubygems_version: !ruby/object:Gem::Requirement
124
124
  none: false
125
125
  requirements: