decidim 0.7.4 → 0.8.0
Sign up to get free protection for your applications and to get access to all the features.
Potentially problematic release.
This version of decidim might be problematic. Click here for more details.
- checksums.yaml +5 -5
- data/Gemfile.lock +74 -63
- data/README.md +33 -37
- data/Rakefile +40 -33
- data/docs/getting_started.md +0 -14
- data/docs/managing_translations_i18n.md +24 -0
- data/docs/testing.md +1 -1
- data/docs/view_hooks.md +74 -0
- data/lib/decidim.rb +2 -0
- data/lib/decidim/version.rb +1 -1
- data/lib/generators/decidim/app_generator.rb +9 -15
- data/lib/generators/decidim/docker_generator.rb +12 -14
- data/lib/generators/decidim/install_generator.rb +1 -1
- data/lib/generators/decidim/templates/Dockerfile.erb +1 -1
- data/lib/generators/decidim/templates/docker-compose.yml.erb +2 -23
- metadata +57 -79
- data/.babelrc +0 -17
- data/.circleci/config.yml +0 -387
- data/.codeclimate.yml +0 -57
- data/.csslintrc +0 -2
- data/.decidim-version +0 -1
- data/.dockerignore +0 -5
- data/.editorconfig +0 -9
- data/.eslintignore +0 -15
- data/.eslintrc.json +0 -277
- data/.gitattributes +0 -3
- data/.github/ISSUE_TEMPLATE.md +0 -31
- data/.github/PULL_REQUEST_TEMPLATE.md +0 -16
- data/.gitignore +0 -15
- data/.inch.yml +0 -5
- data/.rubocop.yml +0 -1278
- data/.ruby-version +0 -1
- data/.simplecov +0 -12
- data/.yardopts +0 -8
- data/CHANGELOG.md +0 -1875
- data/CODE_OF_CONDUCT.md +0 -49
- data/Dockerfile.ci +0 -28
- data/codecov.yml +0 -104
- data/config/i18n-tasks.yml +0 -135
- data/crowdin.yaml +0 -3
- data/decidim.gemspec +0 -44
- data/docker-compose.yml +0 -27
- data/jsconfig.json +0 -3
- data/lib/generators/decidim/templates/Dockerfile.dev.erb +0 -21
- data/lib/generators/decidim/templates/decidim/dummy_authorization_handler.rb +0 -27
- data/logo.svg +0 -62
- data/package-lock.json +0 -11607
- data/package.json +0 -108
- data/spec/generator_spec.rb +0 -51
- data/spec/i18n_spec.rb +0 -37
- data/tsconfig.json +0 -21
- data/tslint.json +0 -11
- data/webpack.config.js +0 -82
- data/webpack.d.ts +0 -5
data/CODE_OF_CONDUCT.md
DELETED
@@ -1,49 +0,0 @@
|
|
1
|
-
# Contributor Code of Conduct
|
2
|
-
|
3
|
-
As contributors and maintainers of this project, and in the interest of
|
4
|
-
fostering an open and welcoming community, we pledge to respect all people who
|
5
|
-
contribute through reporting issues, posting feature requests, updating
|
6
|
-
documentation, submitting pull requests or patches, and other activities.
|
7
|
-
|
8
|
-
We are committed to making participation in this project a harassment-free
|
9
|
-
experience for everyone, regardless of level of experience, gender, gender
|
10
|
-
identity and expression, sexual orientation, disability, personal appearance,
|
11
|
-
body size, race, ethnicity, age, religion, or nationality.
|
12
|
-
|
13
|
-
Examples of unacceptable behavior by participants include:
|
14
|
-
|
15
|
-
* The use of sexualized language or imagery
|
16
|
-
* Personal attacks
|
17
|
-
* Trolling or insulting/derogatory comments
|
18
|
-
* Public or private harassment
|
19
|
-
* Publishing other's private information, such as physical or electronic
|
20
|
-
addresses, without explicit permission
|
21
|
-
* Other unethical or unprofessional conduct
|
22
|
-
|
23
|
-
Project maintainers have the right and responsibility to remove, edit, or
|
24
|
-
reject comments, commits, code, wiki edits, issues, and other contributions
|
25
|
-
that are not aligned to this Code of Conduct, or to ban temporarily or
|
26
|
-
permanently any contributor for other behaviors that they deem inappropriate,
|
27
|
-
threatening, offensive, or harmful.
|
28
|
-
|
29
|
-
By adopting this Code of Conduct, project maintainers commit themselves to
|
30
|
-
fairly and consistently applying these principles to every aspect of managing
|
31
|
-
this project. Project maintainers who do not follow or enforce the Code of
|
32
|
-
Conduct may be permanently removed from the project team.
|
33
|
-
|
34
|
-
This code of conduct applies both within project spaces and in public spaces
|
35
|
-
when an individual is representing the project or its community.
|
36
|
-
|
37
|
-
Instances of abusive, harassing, or otherwise unacceptable behavior may be
|
38
|
-
reported by contacting a project maintainer at josepjaume@gmail.com. All
|
39
|
-
complaints will be reviewed and investigated and will result in a response that
|
40
|
-
is deemed necessary and appropriate to the circumstances. Maintainers are
|
41
|
-
obligated to maintain confidentiality with regard to the reporter of an
|
42
|
-
incident.
|
43
|
-
|
44
|
-
This Code of Conduct is adapted from the [Contributor Covenant][homepage],
|
45
|
-
version 1.3.0, available at
|
46
|
-
[http://contributor-covenant.org/version/1/3/0/][version]
|
47
|
-
|
48
|
-
[homepage]: http://contributor-covenant.org
|
49
|
-
[version]: http://contributor-covenant.org/version/1/3/0/
|
data/Dockerfile.ci
DELETED
@@ -1,28 +0,0 @@
|
|
1
|
-
ARG BASE_IMAGE_TAG=latest
|
2
|
-
|
3
|
-
FROM codegram/decidim:$BASE_IMAGE_TAG
|
4
|
-
MAINTAINER deivid.rodriguez@riseup.net
|
5
|
-
|
6
|
-
USER root
|
7
|
-
|
8
|
-
RUN apt-get update \
|
9
|
-
&& apt-get install -y unzip
|
10
|
-
|
11
|
-
RUN DOCKERIZE_URL="https://circle-downloads.s3.amazonaws.com/circleci-images/cache/linux-amd64/dockerize-latest.tar.gz" \
|
12
|
-
&& curl --silent --show-error --location --fail --retry 3 --output /tmp/dockerize-linux-amd64.tar.gz $DOCKERIZE_URL \
|
13
|
-
&& tar -C /usr/local/bin -xzvf /tmp/dockerize-linux-amd64.tar.gz \
|
14
|
-
&& rm /tmp/dockerize-linux-amd64.tar.gz \
|
15
|
-
&& dockerize --version
|
16
|
-
|
17
|
-
RUN CHROME_URL="https://dl.google.com/linux/direct/google-chrome-stable_current_amd64.deb" \
|
18
|
-
&& curl --silent --show-error --location --fail --retry 3 --output /tmp/google-chrome-stable_current_amd64.deb $CHROME_URL \
|
19
|
-
&& (dpkg -i /tmp/google-chrome-stable_current_amd64.deb || apt-get -fy install) \
|
20
|
-
&& rm /tmp/google-chrome-stable_current_amd64.deb \
|
21
|
-
&& google-chrome-stable --version
|
22
|
-
|
23
|
-
RUN CHROMEDRIVER_RELEASE=$(curl --location --fail --retry 3 http://chromedriver.storage.googleapis.com/LATEST_RELEASE) \
|
24
|
-
&& CHROMEDRIVER_URL="http://chromedriver.storage.googleapis.com/$CHROMEDRIVER_RELEASE/chromedriver_linux64.zip" \
|
25
|
-
&& curl --silent --show-error --location --fail --retry 3 --output /tmp/chromedriver_linux64.zip $CHROMEDRIVER_URL \
|
26
|
-
&& unzip /tmp/chromedriver_linux64.zip chromedriver -d /usr/local/bin \
|
27
|
-
&& rm /tmp/chromedriver_linux64.zip \
|
28
|
-
&& chromedriver --version
|
data/codecov.yml
DELETED
@@ -1,104 +0,0 @@
|
|
1
|
-
---
|
2
|
-
|
3
|
-
coverage:
|
4
|
-
precision: 2
|
5
|
-
round: down
|
6
|
-
range: 70...100
|
7
|
-
|
8
|
-
status:
|
9
|
-
project:
|
10
|
-
default:
|
11
|
-
threshold: 1%
|
12
|
-
core:
|
13
|
-
threshold: 1%
|
14
|
-
flags: core
|
15
|
-
assemblies:
|
16
|
-
threshold: 1%
|
17
|
-
flags: assemblies
|
18
|
-
api:
|
19
|
-
threshold: 1%
|
20
|
-
flags: api
|
21
|
-
processes:
|
22
|
-
threshold: 1%
|
23
|
-
flags: processes
|
24
|
-
admin:
|
25
|
-
threshold: 1%
|
26
|
-
flags: admin
|
27
|
-
system:
|
28
|
-
threshold: 1%
|
29
|
-
flags: system
|
30
|
-
proposals:
|
31
|
-
threshold: 1%
|
32
|
-
flags: proposals
|
33
|
-
comments:
|
34
|
-
threshold: 1%
|
35
|
-
flags: comments
|
36
|
-
meetings:
|
37
|
-
threshold: 1%
|
38
|
-
flags: meetings
|
39
|
-
pages:
|
40
|
-
threshold: 1%
|
41
|
-
flags: pages
|
42
|
-
accountability:
|
43
|
-
threshold: 1%
|
44
|
-
flags: accountability
|
45
|
-
budgets:
|
46
|
-
threshold: 1%
|
47
|
-
flags: budgets
|
48
|
-
surveys:
|
49
|
-
threshold: 1%
|
50
|
-
flags: surveys
|
51
|
-
|
52
|
-
patch:
|
53
|
-
default:
|
54
|
-
target: 50%
|
55
|
-
|
56
|
-
changes: false
|
57
|
-
|
58
|
-
comment:
|
59
|
-
layout: "header, diff"
|
60
|
-
behavior: default
|
61
|
-
|
62
|
-
ignore:
|
63
|
-
- package-lock.json
|
64
|
-
|
65
|
-
flags:
|
66
|
-
core:
|
67
|
-
paths:
|
68
|
-
- decidim-core/
|
69
|
-
assemblies:
|
70
|
-
paths:
|
71
|
-
- decidim-assemblies/
|
72
|
-
api:
|
73
|
-
paths:
|
74
|
-
- decidim-api/
|
75
|
-
processes:
|
76
|
-
paths:
|
77
|
-
- decidim-participatory_processes/
|
78
|
-
admin:
|
79
|
-
paths:
|
80
|
-
- decidim-admin/
|
81
|
-
system:
|
82
|
-
paths:
|
83
|
-
- decidim-system/
|
84
|
-
proposals:
|
85
|
-
paths:
|
86
|
-
- decidim-proposals/
|
87
|
-
comments:
|
88
|
-
paths:
|
89
|
-
- decidim-comments/
|
90
|
-
meetings:
|
91
|
-
paths:
|
92
|
-
- decidim-meetings/
|
93
|
-
pages:
|
94
|
-
paths:
|
95
|
-
- decidim-pages/
|
96
|
-
accountability:
|
97
|
-
paths:
|
98
|
-
- decidim-accountability/
|
99
|
-
budgets:
|
100
|
-
paths:
|
101
|
-
- decidim-budgets/
|
102
|
-
surveys:
|
103
|
-
paths:
|
104
|
-
- decidim-surveys/
|
data/config/i18n-tasks.yml
DELETED
@@ -1,135 +0,0 @@
|
|
1
|
-
# i18n-tasks finds and manages missing and unused translations: https://github.com/glebm/i18n-tasks
|
2
|
-
|
3
|
-
# The "main" locale.
|
4
|
-
base_locale: en
|
5
|
-
|
6
|
-
## Reporting locale, default: en. Available: en, ru.
|
7
|
-
# internal_locale: en
|
8
|
-
|
9
|
-
# Read and write translations.
|
10
|
-
data:
|
11
|
-
## Translations are read from the file system. Supported format: YAML, JSON.
|
12
|
-
## Provide a custom adapter:
|
13
|
-
# adapter: I18n::Tasks::Data::FileSystem
|
14
|
-
|
15
|
-
# Locale files or `File.find` patterns where translations are read from:
|
16
|
-
read:
|
17
|
-
- decidim-*/config/locales/%{locale}.yml
|
18
|
-
|
19
|
-
# Locale files to write new keys to, based on a list of key pattern => file rules. Matched from top to bottom:
|
20
|
-
# `i18n-tasks normalize -p` will force move the keys according to these rules
|
21
|
-
write:
|
22
|
-
<% Dir.glob("decidim-*").each do |path| -%>
|
23
|
-
<%= "- ['#{path.sub('-', '.')}.*', '#{path}/config/locales/%{locale}.yml']" %>
|
24
|
-
<% end -%>
|
25
|
-
- 'decidim-core/config/locales/%{locale}.yml'
|
26
|
-
|
27
|
-
## Specify the router (see Readme for details). Valid values: conservative_router, pattern_router, or a custom class.
|
28
|
-
# router: convervative_router
|
29
|
-
|
30
|
-
yaml:
|
31
|
-
write:
|
32
|
-
# do not wrap lines at 80 characters
|
33
|
-
line_width: -1
|
34
|
-
|
35
|
-
## Pretty-print JSON:
|
36
|
-
# json:
|
37
|
-
# write:
|
38
|
-
# indent: ' '
|
39
|
-
# space: ' '
|
40
|
-
# object_nl: "\n"
|
41
|
-
# array_nl: "\n"
|
42
|
-
|
43
|
-
# Find translate calls
|
44
|
-
search:
|
45
|
-
## Paths or `File.find` patterns to search in:
|
46
|
-
paths:
|
47
|
-
<% Dir.glob("decidim-*").each do |path| -%>
|
48
|
-
<%= "- #{path}/app\n" %>
|
49
|
-
<%= "- #{path}/lib\n" %>
|
50
|
-
<% end -%>
|
51
|
-
|
52
|
-
# Root directories for relative keys resolution.
|
53
|
-
relative_roots:
|
54
|
-
<% Dir.glob("decidim-*").each do |path| -%>
|
55
|
-
<%= "- #{path}/app/controllers\n" %>
|
56
|
-
<%= "- #{path}/app/helpers\n" %>
|
57
|
-
<%= "- #{path}/app/mailers\n" %>
|
58
|
-
<%= "- #{path}/app/presenters\n" %>
|
59
|
-
<%= "- #{path}/app/views\n" %>
|
60
|
-
<% end -%>
|
61
|
-
|
62
|
-
## Files or `File.fnmatch` patterns to exclude from search. Some files are always excluded regardless of this setting:
|
63
|
-
## %w(*.jpg *.png *.gif *.svg *.ico *.eot *.otf *.ttf *.woff *.woff2 *.pdf *.css *.sass *.scss *.less *.yml *.json)
|
64
|
-
exclude:
|
65
|
-
- decidim-comments/app/assets/javascripts/decidim/comments/bundle.js
|
66
|
-
- decidim-comments/app/assets/javascripts/decidim/comments/bundle.js.map
|
67
|
-
- "*.jpeg"
|
68
|
-
|
69
|
-
## Alternatively, the only files or `File.fnmatch patterns` to search in `paths`:
|
70
|
-
## If specified, this settings takes priority over `exclude`, but `exclude` still applies.
|
71
|
-
# only: ["*.rb", "*.html.slim"]
|
72
|
-
|
73
|
-
## If `strict` is `false`, guess usages such as t("categories.#{category}.title"). The default is `true`.
|
74
|
-
strict: false
|
75
|
-
|
76
|
-
## Multiple scanners can be used. Their results are merged.
|
77
|
-
## The options specified above are passed down to each scanner. Per-scanner options can be specified as well.
|
78
|
-
## See this example of a custom scanner: https://github.com/glebm/i18n-tasks/wiki/A-custom-scanner-example
|
79
|
-
|
80
|
-
## Google Translate
|
81
|
-
# translation:
|
82
|
-
# # Get an API key and set billing info at https://code.google.com/apis/console to use Google Translate
|
83
|
-
# api_key: "AbC-dEf5"
|
84
|
-
|
85
|
-
# Do not consider these keys missing:
|
86
|
-
ignore_missing:
|
87
|
-
- '{devise,components}.*'
|
88
|
-
|
89
|
-
# Consider these keys used:
|
90
|
-
ignore_unused:
|
91
|
-
- activemodel.attributes.*
|
92
|
-
- activerecord.attributes.*
|
93
|
-
- booleans.*
|
94
|
-
- '{date,time.formats}.*'
|
95
|
-
- decidim.admin.participatory_process_steps.default_title
|
96
|
-
- decidim.assemblies.statistics.*
|
97
|
-
- decidim.components.*
|
98
|
-
- decidim.filters.linked_classes.*
|
99
|
-
- decidim.forms.errors.*
|
100
|
-
- decidim.participatory_processes.statistics.*
|
101
|
-
- decidim.proposals.answers.*
|
102
|
-
- decidim.proposals.proposals.orders.*
|
103
|
-
- decidim.resource_links.*
|
104
|
-
- decidim.system.default_pages.placeholders.*
|
105
|
-
- errors.messages.*
|
106
|
-
- invisible_captcha.*
|
107
|
-
- pages.home.statistics.*
|
108
|
-
- social_share_button.*
|
109
|
-
- decidim.features.accountability.name
|
110
|
-
- decidim.features.accountability.settings.*
|
111
|
-
- decidim.accountability.models.project.valid_statuses.*
|
112
|
-
|
113
|
-
## Exclude these keys from the `i18n-tasks eq-base' report:
|
114
|
-
# ignore_eq_base:
|
115
|
-
# all:
|
116
|
-
# - common.ok
|
117
|
-
# fr,es:
|
118
|
-
# - common.brand
|
119
|
-
|
120
|
-
## Ignore these keys completely:
|
121
|
-
# ignore:
|
122
|
-
# - kaminari.*
|
123
|
-
|
124
|
-
## Sometimes, it isn't possible for i18n-tasks to match the key correctly,
|
125
|
-
## e.g. in case of a relative key defined in a helper method.
|
126
|
-
## In these cases you can use the built-in PatternMapper to map patterns to keys, e.g.:
|
127
|
-
#
|
128
|
-
# <%#= I18n::Tasks.add_scanner 'I18n::Tasks::Scanners::PatternMapper',
|
129
|
-
# only: %w(*.html.haml *.html.slim),
|
130
|
-
# patterns: [['= title\b', '.page_title']] %>
|
131
|
-
#
|
132
|
-
# The PatternMapper can also match key literals via a special %{key} interpolation, e.g.:
|
133
|
-
#
|
134
|
-
# <%#= I18n::Tasks.add_scanner 'I18n::Tasks::Scanners::PatternMapper',
|
135
|
-
# patterns: [['\bSpree\.t[( ]\s*%{key}', 'spree.%{key}']] %>
|
data/crowdin.yaml
DELETED
data/decidim.gemspec
DELETED
@@ -1,44 +0,0 @@
|
|
1
|
-
# frozen_string_literal: true
|
2
|
-
|
3
|
-
lib = File.expand_path("lib", __dir__)
|
4
|
-
|
5
|
-
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
6
|
-
|
7
|
-
# Maintain your gem's version:
|
8
|
-
require "decidim/version"
|
9
|
-
|
10
|
-
Gem::Specification.new do |s|
|
11
|
-
s.version = Decidim.version
|
12
|
-
s.authors = ["Josep Jaume Rey Peroy", "Marc Riera Casals", "Oriol Gual Oliva"]
|
13
|
-
s.email = ["josepjaume@gmail.com", "mrc2407@gmail.com", "oriolgual@gmail.com"]
|
14
|
-
s.license = "AGPL-3.0"
|
15
|
-
s.homepage = "https://github.com/decidim/decidim"
|
16
|
-
s.required_ruby_version = ">= 2.3.1"
|
17
|
-
|
18
|
-
s.name = "decidim"
|
19
|
-
|
20
|
-
s.summary = "Citizen participation framework for Ruby on Rails."
|
21
|
-
s.description = "Citizen participation framework for Ruby on Rails."
|
22
|
-
|
23
|
-
s.files = `git ls-files -z`.split("\x0").reject { |f| f.match(%r{^decidim-.*/}) }
|
24
|
-
s.bindir = "bin"
|
25
|
-
s.executables = ["decidim"]
|
26
|
-
s.require_paths = ["lib"]
|
27
|
-
|
28
|
-
s.add_dependency "decidim-core", Decidim.version
|
29
|
-
s.add_dependency "decidim-participatory_processes", Decidim.version
|
30
|
-
s.add_dependency "decidim-system", Decidim.version
|
31
|
-
s.add_dependency "decidim-admin", Decidim.version
|
32
|
-
s.add_dependency "decidim-api", Decidim.version
|
33
|
-
s.add_dependency "decidim-pages", Decidim.version
|
34
|
-
s.add_dependency "decidim-comments", Decidim.version
|
35
|
-
s.add_dependency "decidim-meetings", Decidim.version
|
36
|
-
s.add_dependency "decidim-proposals", Decidim.version
|
37
|
-
s.add_dependency "decidim-accountability", Decidim.version
|
38
|
-
s.add_dependency "decidim-budgets", Decidim.version
|
39
|
-
s.add_dependency "decidim-surveys", Decidim.version
|
40
|
-
|
41
|
-
s.add_development_dependency "bundler", "~> 1.12"
|
42
|
-
s.add_development_dependency "rake", "~> 12.0.0"
|
43
|
-
s.add_development_dependency "rspec", "~> 3.0"
|
44
|
-
end
|
data/docker-compose.yml
DELETED
@@ -1,27 +0,0 @@
|
|
1
|
-
version: '2'
|
2
|
-
services:
|
3
|
-
decidim:
|
4
|
-
image: decidim/decidim:dev-latest
|
5
|
-
entrypoint: []
|
6
|
-
command: decidim
|
7
|
-
volumes:
|
8
|
-
- .:/app
|
9
|
-
- bundle:/usr/local/bundle
|
10
|
-
environment:
|
11
|
-
- DATABASE_HOST=pg
|
12
|
-
- DATABASE_USERNAME=postgres
|
13
|
-
links:
|
14
|
-
- pg
|
15
|
-
- redis
|
16
|
-
pg:
|
17
|
-
image: postgres
|
18
|
-
volumes:
|
19
|
-
- pg-data:/var/lib/postgresql/data
|
20
|
-
redis:
|
21
|
-
image: redis
|
22
|
-
volumes:
|
23
|
-
- redis-data:/data
|
24
|
-
volumes:
|
25
|
-
bundle: {}
|
26
|
-
pg-data: {}
|
27
|
-
redis-data: {}
|
data/jsconfig.json
DELETED
@@ -1,21 +0,0 @@
|
|
1
|
-
FROM codegram/decidim
|
2
|
-
MAINTAINER david.morcillo@codegram.com
|
3
|
-
|
4
|
-
ARG rails_env=development
|
5
|
-
ARG secret_key_base=
|
6
|
-
|
7
|
-
ENV APP_HOME /code
|
8
|
-
ENV RAILS_ENV $rails_env
|
9
|
-
ENV SECRET_KEY_BASE $secret_key_base
|
10
|
-
|
11
|
-
ADD Gemfile /tmp/Gemfile
|
12
|
-
ADD Gemfile.lock /tmp/Gemfile.lock
|
13
|
-
RUN cd /tmp && bundle install
|
14
|
-
|
15
|
-
RUN mkdir -p $APP_HOME
|
16
|
-
WORKDIR $APP_HOME
|
17
|
-
ADD . $APP_HOME
|
18
|
-
|
19
|
-
RUN bundle exec rake DATABASE_URL=postgresql://user:pass@127.0.0.1/dbname assets:precompile
|
20
|
-
|
21
|
-
CMD ["bundle", "exec", "rails", "s", "-b0.0.0.0"]
|
@@ -1,27 +0,0 @@
|
|
1
|
-
# frozen_string_literal: true
|
2
|
-
|
3
|
-
module Decidim
|
4
|
-
# An example implementation of an AuthorizationHandler to be used in tests.
|
5
|
-
class DummyAuthorizationHandler < AuthorizationHandler
|
6
|
-
attribute :document_number, String
|
7
|
-
attribute :postal_code, String
|
8
|
-
attribute :birthday, Date
|
9
|
-
|
10
|
-
validates :document_number, presence: true
|
11
|
-
validate :valid_document_number
|
12
|
-
|
13
|
-
def metadata
|
14
|
-
super.merge(document_number: document_number)
|
15
|
-
end
|
16
|
-
|
17
|
-
def unique_id
|
18
|
-
document_number
|
19
|
-
end
|
20
|
-
|
21
|
-
private
|
22
|
-
|
23
|
-
def valid_document_number
|
24
|
-
errors.add(:document_number, :invalid) unless document_number.to_s.end_with?("X")
|
25
|
-
end
|
26
|
-
end
|
27
|
-
end
|