Fix specs after rebase with translations branch

- Fix spec spec/features/management/proposals_spec.rb:24 adding single quotes.
- Remove spec related with 'proposal improvement info link' as master branch.
- Fix proposal rake task (now proposals have translations). We put the 'validate: false' to keep the existing html tags in the  proposal's description. Without the sanitizable module deleting them.
This commit is contained in:
taitus
2019-03-27 22:41:44 +01:00
committed by voodoorai2000
parent 4236a3a388
commit 95f848f021

View File

@@ -11,10 +11,14 @@ namespace :proposals do
print "Move external_url to description for #{model}s"
model.find_each do |resource|
if resource.external_url.present?
resource.update_columns(description: "#{resource.description} "\
"<p>#{text_with_links(resource.external_url)}</p>",
external_url: "", updated_at: Time.current)
print "."
Globalize.with_locale(I18n.default_locale) do
new_description = "#{resource.description} <p>#{text_with_links(resource.external_url)}</p>"
resource.description = new_description
resource.external_url = ""
resource.updated_at = Time.current
resource.save(validate: false)
print "."
end
end
end
puts " ✅ "