Commit Graph

13 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
47b2c42a1d Apply IndentationConsistency rubocop rule 2019-09-10 20:02:15 +02:00
rgarcia
b2b418284d Fix ActiveModel::Errors#[]= deprecation warning
DEPRECATION WARNING: ActiveModel::Errors#[]= is deprecated and will be
removed in Rails 5.1. Use model.errors.add(:attachment, "content type
image/png does not match any of accepted content types pdf") instead.
(called from validate_attachment_content_type at
/home/travis/build/consul/consul/app/models/document.rb:92)
2019-04-17 17:40:55 +02:00
Bertocq
ce9d5ec022 Cleanup bad indentation on direct upload model 2018-01-03 17:38:44 +01:00
Bertocq
ce0a7f6fad Rubocop autocorrections 2017-10-17 22:00:00 +02:00
rgarcia
23682fadd8 fixes document specs 2017-10-06 17:50:41 +02:00
rgarcia
9a31c97a20 fixes image specs 2017-10-06 14:01:03 +02:00
rgarcia
a15d1a4020 resolves conflict when uploading pdfs to answers 2017-10-06 02:52:06 +02:00
rgarcia
06a1b96fcd clean up 2017-10-04 23:56:23 +02:00
rgarcia
1cf9bc4ad1 adds images to anwers 2017-10-04 23:56:09 +02:00
Senén Rodero Rodríguez
661bdda41f Stronger direct upload model specs 2017-09-26 13:56:06 +02:00
Senén Rodero Rodríguez
826385f659 Extract ajax upload and destroy_upload actions from images and documents controllers and place them at new controllers to manage direct uploads 2017-09-26 13:55:28 +02:00
Senén Rodero Rodríguez
c6dabedb4a Add missing image model spec. Add shared specs to check image validations at any imageable model 2017-09-26 13:55:03 +02:00