Commit Graph

14 Commits

Author SHA1 Message Date
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
6b1864fbcd Sanitize translations instead of using _html
Using the `_html` suffix in an i18n key is the same as using `html_safe`
on it, which means that translation could potentially be used for XSS
attacks.
2019-10-09 19:46:47 +02:00
Javi Martín
5ff1162038 Simplify creating follows in specs
While in theory we wouldn't need to use the `transient` nor the
`after(:create)` because there's already a `has_many :through`
association with followers, Factory Bot / ActiveRecord don't
automatically associate the followable, resulting in an invalid record
exception.
2019-09-30 13:34:31 +02:00
Julian Herrero
31ac8b7f55 Change single quotes to double quotes 2019-02-15 11:40:39 +01:00
Bertocq
fbfabaeda4 Fix typo at followable shared spec 2018-02-19 11:07:59 +01:00
Bertocq
44aeb7528d Fix line lenght issues on spec files 2018-02-15 23:21:03 +01:00
Bertocq
f376707b2d Fix style of method with parameters call using parenthesis 2017-12-13 14:11:52 +01:00
Bertocq
1c863d7d84 Use activerecord model name on followable specs 2017-12-13 14:11:22 +01:00
Bertocq
7d406cae76 Rubocop autocorrections 2017-07-25 13:01:03 +02:00
Senén Rodero Rodríguez
dec7d2d2b5 Add followable specific notices to follows controller actions and render notice on AJAX JS response. 2017-07-19 19:43:05 +02:00
Senén Rodero Rodríguez
c9a6630c94 Remove popup on follow buttons and remove uneeded code. 2017-07-19 17:51:45 +02:00
taitus
e54e33f296 Use display in followable shared specs names when referring to DOM elements renderization. Add whitespace to proposal page. 2017-07-07 13:38:53 +02:00
taitus
35f7f11177 Add dependent destroy to followable. 2017-07-07 13:37:55 +02:00
Senén Rodero Rodríguez
1f22286e29 Create rspec shared examples to test followable features on any followable entity. 2017-07-07 13:34:54 +02:00