Commit Graph

18 Commits

Author SHA1 Message Date
Javi Martín
ffc50246c2 Apply explict RSpec/DescribedClass rubocop rule
We settled on using this style in commit 4cbe81a1, but didn't add the
rule enforcing this style and we didn't apply it to existing code.
2019-09-23 16:51:00 +02:00
Javi Martín
58ba517717 Apply RSpec/ExampleWording rubocop rule 2019-09-10 21:43:39 +02:00
taitus
3e383d7c1f Add new fields to form
- Add :date_of_birth and :postal_code
- Only display new fields when aplication has configured the
custom census API and contains alias values for fields. Add 2
class Setting methods to check this feature:
  - force_presence_date_of_birth?
  - force_presence_postal_code?
2019-07-29 13:10:09 +02:00
taitus
637675a1f5 Add content to the Remote Census Configuration tab
- Render remote census configuration content on settings index.
 - Update type method from Setting
   On Admin::SettingsController#index we are using 'all_settings' to
   group all settings by 'type' method.
   'type' method return the first part of key when split by '.'
   To allow use by example: all_settings["remote_census.general"]
   and recover only settings related with this key we have added new
   'elsif' on 'type' method.
2019-07-29 13:10:09 +02:00
Julian Herrero
8e0bbf54f6 Replace harcoded images and documents settings 2019-06-04 11:50:09 +02:00
Julian Herrero
220bfb065a Add images and documents settings to admin panel 2019-06-04 11:47:22 +02:00
Julian Herrero
e32faf3a3c Extract setting prefix to a method
We may need to access the setting key prefix in the future, so it's
better to have it in a method to avoid duplication
2019-06-04 11:39:53 +02:00
Javi Martín
bb504d90fb Add method to add new settings 2019-05-31 19:33:31 +02:00
Julian Herrero
9ed6aae348 Refactor Setting model
- Make easier to group settings by using prefixes
- Add method to rename setting keys
- Add method to remove setting keys
2019-03-19 15:14:08 +01:00
decabeza
8066b96fe3 Remove legacy banner images and banner styles settings 2019-02-25 14:59:38 +01:00
Julian Herrero
31ac8b7f55 Change single quotes to double quotes 2019-02-15 11:40:39 +01:00
Bertocq
ed16a78f42 Enables RSpec/ExampleWording and fixes all issues
Both avoiding 'should' and repiting 'it' on the tests description
improves reading them and also makes all descriptions consistent.

Read about cop at http://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/ExampleWording
2018-01-07 01:03:45 +01:00
Bertocq
265d4d0967 Enables RSpec/DescribedClass cop & fixes all issues
Autocorrection for existing issues, and stashing at .rubocop_todo.yml
the false positives

Read about cop at http://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/DescribedClass
2018-01-07 00:38:19 +01:00
MaiteHdezRivas
3b2bfc46cf Admin option to add banners and show banners 2016-05-19 13:18:30 +02:00
Juanjo Bazán
bb60e6b8e0 adds #enabled? to Setting 2016-01-25 14:07:07 +01:00
Juanjo Bazán
05837afd72 adds #feature_flag? to Setting 2016-01-25 13:45:15 +01:00
Josep Jaume Rey Peroy
5de3d700e4 Simplify Settings API 2016-01-18 12:43:34 +01:00
Juanjo Bazán
916f0bf901 adds spec for Setting 2015-09-01 17:49:01 +02:00