Fix all Rails/Validation rubocop issues and remove files from rubocop_todo list

This commit is contained in:
Bertocq
2017-06-21 20:49:44 +02:00
parent d759aca522
commit 8d84ed712a
7 changed files with 12 additions and 23 deletions

View File

@@ -25,8 +25,8 @@ class Budget
validates :author, presence: true
validates :description, presence: true
validates :heading_id, presence: true
validates_presence_of :unfeasibility_explanation, if: :unfeasibility_explanation_required?
validates_presence_of :price, if: :price_required?
validates :unfeasibility_explanation, presence: { if: :unfeasibility_explanation_required? }
validates :price, presence: { if: :price_required? }
validates :title, length: { in: 4..Budget::Investment.title_max_length }
validates :description, length: { maximum: Budget::Investment.description_max_length }