decidim-pages 0.0.2 → 0.0.3

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 6d4f91509718700bba96bb88a5ea4699924256e9
4
- data.tar.gz: f4852700fc682d785e646f0d70037700214bad83
3
+ metadata.gz: e0af95f3bc7dab1f8c00fdddcd3200a26848a4aa
4
+ data.tar.gz: 16a253297f058d7562f81d4d7509bdf904de9161
5
5
  SHA512:
6
- metadata.gz: 60ad78cc25ad9cb936d21c8ec41c60b61fed3ac39f190322e56ce144af173f3ee9d2e37f21def010d37bc4acac75408cc30c6c68c252795bcaae83a4eaa0fa1b
7
- data.tar.gz: 51b6191f76068e592d06e4f3019433bd56a5456fc42fe242cde032a7b7295c35f38e11f38b89e72f7595c51d17fa395bd68ecc94d8d41b6db2cb0f18f8f1e929
6
+ metadata.gz: eb6349b85f5d5a7afe7b2cebf8109dc89b97d81c227c2897cb5ab904c2e4ee06bb4012cca8342c11dd4cef8ef699472152c0bebeea19035d6274fe7683a803a9
7
+ data.tar.gz: 4a0cd277ce8b0ff30a99e9a4b75c99ea58f185078470fdcf6ea203dcb7ead2c29cc7317834aaa025bbf6372338153df6f9e8f35ee21d3a13aa7a9eb66d622abe
@@ -4,9 +4,18 @@ module Decidim
4
4
  # The data store for a Page in the Decidim::Pages component. It stores a
5
5
  # title, description and any other useful information to render a custom page.
6
6
  class Page < Pages::ApplicationRecord
7
- validates :title, :feature, presence: true
8
7
  belongs_to :feature, foreign_key: "decidim_feature_id", class_name: Decidim::Feature
9
8
  has_one :organization, through: :feature
9
+
10
+ validates :title, :feature, presence: true
11
+ validate :feature_manifest_matches
12
+
13
+ private
14
+
15
+ def feature_manifest_matches
16
+ return unless feature
17
+ errors.add(:feature, :invalid) unless feature.manifest_name == "pages"
18
+ end
10
19
  end
11
20
  end
12
21
  end
@@ -1,4 +1,5 @@
1
- <% content_for(:title, translated_attribute(@page.title)) %>
1
+ <% content_for(:meta_title, translated_attribute(@page.title)) %>
2
+
2
3
  <div class="row column">
3
4
  <div class="row">
4
5
  <div class="columns medium-7 mediumlarge-8">
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: decidim-pages
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.2
4
+ version: 0.0.3
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: 2017-01-23 00:00:00.000000000 Z
13
+ date: 2017-02-01 00:00:00.000000000 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: decidim-core
@@ -18,28 +18,28 @@ dependencies:
18
18
  requirements:
19
19
  - - '='
20
20
  - !ruby/object:Gem::Version
21
- version: 0.0.2
21
+ version: 0.0.3
22
22
  type: :runtime
23
23
  prerelease: false
24
24
  version_requirements: !ruby/object:Gem::Requirement
25
25
  requirements:
26
26
  - - '='
27
27
  - !ruby/object:Gem::Version
28
- version: 0.0.2
28
+ version: 0.0.3
29
29
  - !ruby/object:Gem::Dependency
30
30
  name: decidim-comments
31
31
  requirement: !ruby/object:Gem::Requirement
32
32
  requirements:
33
33
  - - '='
34
34
  - !ruby/object:Gem::Version
35
- version: 0.0.2
35
+ version: 0.0.3
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.0.2
42
+ version: 0.0.3
43
43
  - !ruby/object:Gem::Dependency
44
44
  name: rectify
45
45
  requirement: !ruby/object:Gem::Requirement
@@ -60,14 +60,14 @@ dependencies:
60
60
  requirements:
61
61
  - - '='
62
62
  - !ruby/object:Gem::Version
63
- version: 0.0.2
63
+ version: 0.0.3
64
64
  type: :development
65
65
  prerelease: false
66
66
  version_requirements: !ruby/object:Gem::Requirement
67
67
  requirements:
68
68
  - - '='
69
69
  - !ruby/object:Gem::Version
70
- version: 0.0.2
70
+ version: 0.0.3
71
71
  description: A pages component for decidim's participatory processes.
72
72
  email:
73
73
  - josepjaume@gmail.com