Commit Graph

35 Commits

Author SHA1 Message Date
Javi Martín
8b5cca746c Apply rubocop rules to freeze constants
Added by popular demand among our team members.
2019-10-26 13:21:36 +02:00
Javi Martín
42d2e5b3ad Apply Rails/InverseOf rubocop rule
Not doing so has a few gotchas when working with relations, particularly
with records which are not stored in the database.

I'm excluding the related content file because it's got a very peculiar
relationship with itself: the `has_one :opposite_related_content` has no
inverse; the relation itself is its inverse. It's a false positive since
the inverse condition is true:

```
content.opposite_related_content.opposite_related_content.object_id ==
  content.object_id
```
2019-10-25 19:29:12 +02:00
Javi Martín
57ef380379 Add and apply Layout/ExtraSpacing rubocop rule 2019-10-24 18:11:58 +02:00
Javi Martín
db97f9d08c Add and apply rubocop rules for empty lines
We were very inconsistent regarding these rules.

Personally I prefer no empty lines around blocks, clases, etc... as
recommended by the Ruby style guide [1], and they're the default values
in rubocop, so those are the settings I'm applying.

The exception is the `private` access modifier, since we were leaving
empty lines around it most of the time. That's the default rubocop rule
as well. Personally I don't have a strong preference about this one.


[1] https://rubystyle.guide/#empty-lines-around-bodies
2019-10-24 17:11:47 +02:00
Javi Martín
9fe8c47528 Apply Rails/SafeNavigation rubocop rule 2019-09-10 21:43:39 +02:00
decabeza
43dd3d2169 Include mailer header logo on custom images list 2019-05-21 11:22:04 +02:00
Juanjo Bazán
7ab602175a makes models inherit from ApplicationRecord 2019-04-17 17:40:56 +02:00
decabeza
483182ceed Refactor scopes on site customization page model 2019-01-30 18:03:58 +01:00
decabeza
2695e19e2f Fix hound warnings 2019-01-29 17:54:02 +01:00
Alberto
bd4826b25e Merge branch 'master' into add_cards_to_custom_pages 2019-01-28 14:49:39 +01:00
decabeza
045c4eca64 Allow change map image from admin site customization
Also adds on site customization image.rb jpeg content type to allow replace this image.
2019-01-24 14:55:01 +01:00
Manu
5627d2cf23 added associations between cards and pages models 2019-01-18 09:54:43 -05:00
Raimond Garcia
e23fbc8d58 Merge pull request #2970 from PierreMesure/Remove-icon-png-from-settings
Removed icon_home and fixed corresponding test
2018-11-27 11:11:51 +01:00
Angel Perez
3574bf867c Add default image for investments without picture 2018-11-05 18:04:38 +01:00
decabeza
884580206a Fixes houndci-bot warnings 2018-10-31 14:22:10 +01:00
Javi Martín
863b326142 Validate both the model and its translations
This way we guarantee there will be at least one translation for a model
and we keep compatibility with the rest of the application, which
ideally isn't aware of globalize.
2018-10-22 16:30:28 +02:00
Javi Martín
2ab49a1832 Refactor globalize models code using a concern
I've chosen the name "Globalizable" because "Translatable" already
existed.
2018-10-22 16:28:53 +02:00
Javi Martín
3c170f47d2 Update site customization pages translatable fields 2018-10-22 16:13:48 +02:00
Pierre Mesure
f586190651 Removed icon_home and fixed corresponding test 2018-10-12 09:52:53 +02:00
Papaya Labs
914bfa645e Updates translatable custom pages 2018-09-27 13:46:17 +02:00
Alberto
21f36e6be5 Merge branch 'master' into feature/1-nav-content-blocks 2018-09-05 12:41:07 +02:00
decabeza
c15769ba48 Updates logo header sizes and images for specs 2018-07-30 19:55:43 +02:00
Ziyan Junaideen
a6bbf32b8e Content blocks - new keys 2018-07-26 22:55:49 +05:30
Ziyan Junaideen
5b6a6b5324 Changed keys for locations 2018-07-26 22:55:49 +05:30
Ziyan Junaideen
1c818850d2 Content blocks for navigation 2018-07-26 22:55:49 +05:30
decabeza
2844c03e43 adds consistency on social media filenames 2017-07-18 11:40:19 +02:00
María Checa
8894ec4f7c Pages form improvements
Added `locale` validation to model and improved its form select tag performance.
2017-07-02 21:28:13 +02:00
María Checa
ed7b7f0361 Added scope to pages model
New scope to use when listing pages to show only the ones with current locale.
2017-07-02 14:54:11 +02:00
Bertocq
21c6d1c4dd Cleanup Lint/AssignmentInCondition rubocop issues on code and remove it from ruboco_todo list 2017-06-19 10:45:18 +02:00
Bertocq
02524b164a Rubocop autocorrections (indentations, revers unless to if, extra spaces) 2017-06-08 12:14:35 +02:00
Amaia Castro
c1de2dced4 Custom content blocks for top_links and footer 2017-04-06 17:00:05 +02:00
Amaia Castro
ae3690ab5f Validate presence of page slug 2017-04-06 17:00:04 +02:00
Amaia Castro
8143fe1037 Site customization: images uploads 2017-04-06 17:00:04 +02:00
Amaia Castro
54fab919e5 Show custom pages in public site 2017-04-06 16:59:58 +02:00
Amaia Castro
255b57cc85 Admin for custom pages 2017-04-06 16:25:07 +02:00