Merge branch 'dev'
This commit is contained in:
commit
7b9b7aba14
4 changed files with 18 additions and 7 deletions
|
@ -68,7 +68,7 @@ Afin de générer la BDD de l'application, il est nécessaire d'éxécuter les c
|
|||
|
||||
AutoArchiveProcedureJob.set(cron: "* * * * *").perform_later
|
||||
WeeklyOverviewJob.set(cron: "0 8 * * 0").perform_later
|
||||
AutoReceiveDossiersForProcedureJob.set(cron: "* * * * *").perform_later(procedure_declaratoire_id)
|
||||
AutoReceiveDossiersForProcedureJob.set(cron: "* * * * *").perform_later(procedure_declaratoire_id, "received")
|
||||
|
||||
## Exécution des tests (RSpec)
|
||||
|
||||
|
|
|
@ -1,10 +1,14 @@
|
|||
module HtmlToStringHelper
|
||||
def html_to_string(html)
|
||||
string_with_tags = html
|
||||
.gsub(/<br[ ]?[\/]?>/, "\n")
|
||||
.gsub('</p>', "\n")
|
||||
.gsub('<p>', '')
|
||||
if html.blank?
|
||||
html
|
||||
else
|
||||
string_with_tags = html
|
||||
.gsub(/<br[ ]?[\/]?>/, "\n")
|
||||
.gsub('</p>', "\n")
|
||||
.gsub('<p>', '')
|
||||
|
||||
strip_tags(string_with_tags)
|
||||
strip_tags(string_with_tags)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
|
@ -20,6 +20,8 @@
|
|||
= link_to "Nouveautés", "https://github.com/sgmap/tps/releases", :class => "footer-link"
|
||||
%li.footer-link
|
||||
= link_to "Statistiques", stats_path, :class => "footer-link"
|
||||
%li.footer-link
|
||||
= link_to "CGU", "https://tps.gitbooks.io/tps-documentation/content/conditions-generales-dutilisation.html", :class => "footer-link", :target => "_blank"
|
||||
|
||||
%li.footer-column
|
||||
%ul.footer-links
|
||||
|
@ -32,4 +34,4 @@
|
|||
%li.footer-link
|
||||
= link_to "Documentation de l'API", "/docs", :class => "footer-link", :target => "_blank"
|
||||
%li.footer-link
|
||||
= link_to "CGU", "https://tps.gitbooks.io/tps-documentation/content/conditions-generales-dutilisation.html", :class => "footer-link", :target => "_blank"
|
||||
= link_to "FAQ", "http://tps.helpscoutdocs.com/", :class => "footer-link", :target => "_blank"
|
||||
|
|
|
@ -4,6 +4,11 @@ describe HtmlToStringHelper do
|
|||
it { expect(helper.html_to_string('text')).to eq('text') }
|
||||
end
|
||||
|
||||
describe 'deals with empty / nil strings' do
|
||||
it { expect(helper.html_to_string(nil)).to eq(nil) }
|
||||
it { expect(helper.html_to_string('')).to eq("") }
|
||||
end
|
||||
|
||||
describe 'deals with <br>' do
|
||||
it { expect(helper.html_to_string('new<br>line')).to eq("new\nline") }
|
||||
it { expect(helper.html_to_string('new<br/>line')).to eq("new\nline") }
|
||||
|
|
Loading…
Reference in a new issue