Add proposal translations

Adapt retire form to include needed translations and move validations
from controller to model.

Also change sanitizable concern to sanitize not marked for destruction
translations.
This commit is contained in:
Senén Rodero Rodríguez
2018-12-22 23:35:32 +01:00
committed by voodoorai2000
parent 5343448c5a
commit 02be0c61f9
10 changed files with 137 additions and 31 deletions

View File

@@ -78,7 +78,8 @@ shared_examples "notifiable" do
notification = create(:notification, notifiable: notifiable)
if notifiable.respond_to?(:retired_at)
notifiable.update(retired_at: Time.current)
notifiable.update(retired_at: Time.current, retired_reason: "unfeasible",
retired_explanation: "Unfeasibility explanation ...")
expect(notification.check_availability(notifiable)).to be(false)
end
end