decidim-admin 0.11.0.pre1 → 0.11.1

Sign up to get free protection for your applications and to get access to all the features.

Potentially problematic release.


This version of decidim-admin might be problematic. Click here for more details.

checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: e66b30e2476e200011abd836e27bf1bb39693cf379e764b355098b8db233f674
4
- data.tar.gz: cfcc74ee98f3205d5f82a5bc8300d8c08d8eabc4d8ee2e53e5216545a86a2aae
3
+ metadata.gz: 40289756f129897cbc3a53092b60c8d80f0301fa34bdb53606e124d9df17e961
4
+ data.tar.gz: b0936d7e5cdc2dfd4aee2eebf99885eee7745693c3488a60a023d368cbd37b2c
5
5
  SHA512:
6
- metadata.gz: e8c7e24b71a4063babc7d6a4336e02a3aafea2c731a69af9e277e9daef0273119f5ee2738410671560a00c7d5cbeb77c7725e221f7d423235f499e7dd9b4c9c8
7
- data.tar.gz: 3d85b2913258ed6d2ed2274b715bbd7fea7363ce82943c00f45f5e2bdf6800058b005b6d85c94074b5e7b2596c63a0446d01ebe8cef156a3c920f61530191238
6
+ metadata.gz: 39b40215a49bb09cbdc7785478322d91e57c1cb97a0488d5434fb0197b075a849d18e3caaf5382b25f9ff4f714c0626fcf140c6eb10b4dffc9583651adbcb260
7
+ data.tar.gz: a14ee8e77cfbc6cff5d35ac5c4e589b04398be071a9f3b8a4c309e3d328697f1cb61a776e521084625b9e7e3f919de40a2d98538977ad8017f3471f758c6ba43
@@ -15,6 +15,15 @@ module Decidim
15
15
  validates :name, translatable_presence: true
16
16
  validates :organization, presence: true
17
17
 
18
+ validate :name_uniqueness
19
+
20
+ def name_uniqueness
21
+ return unless organization
22
+ return unless organization.areas.where(name: name, area_type: area_type).where.not(id: id).any?
23
+
24
+ errors.add(:name, :taken)
25
+ end
26
+
18
27
  alias organization current_organization
19
28
 
20
29
  def area_type
@@ -4,7 +4,7 @@ module Decidim
4
4
  # This holds the decidim-admin version.
5
5
  module Admin
6
6
  def self.version
7
- "0.11.0.pre1"
7
+ "0.11.1"
8
8
  end
9
9
  end
10
10
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: decidim-admin
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.11.0.pre1
4
+ version: 0.11.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Josep Jaume Rey Peroy
@@ -10,7 +10,7 @@ authors:
10
10
  autorequire:
11
11
  bindir: bin
12
12
  cert_chain: []
13
- date: 2018-04-26 00:00:00.000000000 Z
13
+ date: 2018-05-14 00:00:00.000000000 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: active_link_to
@@ -32,14 +32,14 @@ dependencies:
32
32
  requirements:
33
33
  - - '='
34
34
  - !ruby/object:Gem::Version
35
- version: 0.11.0.pre1
35
+ version: 0.11.1
36
36
  type: :runtime
37
37
  prerelease: false
38
38
  version_requirements: !ruby/object:Gem::Requirement
39
39
  requirements:
40
40
  - - '='
41
41
  - !ruby/object:Gem::Version
42
- version: 0.11.0.pre1
42
+ version: 0.11.1
43
43
  - !ruby/object:Gem::Dependency
44
44
  name: devise
45
45
  requirement: !ruby/object:Gem::Requirement
@@ -116,28 +116,28 @@ dependencies:
116
116
  requirements:
117
117
  - - '='
118
118
  - !ruby/object:Gem::Version
119
- version: 0.11.0.pre1
119
+ version: 0.11.1
120
120
  type: :development
121
121
  prerelease: false
122
122
  version_requirements: !ruby/object:Gem::Requirement
123
123
  requirements:
124
124
  - - '='
125
125
  - !ruby/object:Gem::Version
126
- version: 0.11.0.pre1
126
+ version: 0.11.1
127
127
  - !ruby/object:Gem::Dependency
128
128
  name: decidim-participatory_processes
129
129
  requirement: !ruby/object:Gem::Requirement
130
130
  requirements:
131
131
  - - '='
132
132
  - !ruby/object:Gem::Version
133
- version: 0.11.0.pre1
133
+ version: 0.11.1
134
134
  type: :development
135
135
  prerelease: false
136
136
  version_requirements: !ruby/object:Gem::Requirement
137
137
  requirements:
138
138
  - - '='
139
139
  - !ruby/object:Gem::Version
140
- version: 0.11.0.pre1
140
+ version: 0.11.1
141
141
  description: Organization administration to manage a single organization.
142
142
  email:
143
143
  - josepjaume@gmail.com
@@ -508,9 +508,9 @@ required_ruby_version: !ruby/object:Gem::Requirement
508
508
  version: '2.3'
509
509
  required_rubygems_version: !ruby/object:Gem::Requirement
510
510
  requirements:
511
- - - ">"
511
+ - - ">="
512
512
  - !ruby/object:Gem::Version
513
- version: 1.3.1
513
+ version: '0'
514
514
  requirements: []
515
515
  rubyforge_project:
516
516
  rubygems_version: 2.7.3