diff --git a/app/models/plume.rb b/app/models/plume.rb index 1ccd878..ae8173d 100644 --- a/app/models/plume.rb +++ b/app/models/plume.rb @@ -40,12 +40,10 @@ class Plume < ActiveRecord::Base return cat.plume_articles.first else - if self.id = 3 - if a = self.plume_articles.where(:id => 25).first - a - else - return nil - end + if self.id = 3 and a = self.plume_articles.where(:id => 25).first + a + elsif self.id = 11 and a = self.plume_articles.where(:id => 218).first + a else return nil end diff --git a/app/views/public/plumes/show.html.haml b/app/views/public/plumes/show.html.haml index 11fd7a9..5cbd9cb 100644 --- a/app/views/public/plumes/show.html.haml +++ b/app/views/public/plumes/show.html.haml @@ -54,7 +54,7 @@ -if @plume.data_file =link_to "Télécharger la version PDF", @plume.data_file.file.path, :target => "plume_pdf_#{plume.id}", :class => "btn" -else - =link_to "Télécharger la version PDF", print_public_plume_path(@plume, :format => "pdf"), :target => "plume_pdf_#{@plume.id}", :class => "btn" + =link_to "Télécharger la version PDF", print_public_plume_path(@plume.id, :format => "pdf"), :target => "plume_pdf_#{@plume.id}", :class => "btn" .clear