Skip to content

Commit

Permalink
Boletines
Browse files Browse the repository at this point in the history
  • Loading branch information
colmexdev committed Aug 29, 2019
1 parent 125565f commit 3be1955
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
5 changes: 3 additions & 2 deletions app/models/boletin.rb
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,11 @@ class Boletin < ActiveRecord::Base

validates_presence_of :titulo
validates_presence_of :fecha
has_attached_file :documento, :styles => {:pdf_thumbnail => ["", :jpg], :original => ""},
has_attached_file :documento, :styles => {:pdf_thumbnail => ["", :jpg]},
:url => "/assets/boletines/:style/:id_:basename.:extension",
:path => ":rails_root/public/assets/boletines/:style/:id_:basename.:extension",
:default_url => "/vacio.png"
:default_url => "/vacio.png",
:convert_options => {:all => '-background white -flatten +matte'}

validates_attachment_content_type :documento, :content_type => ['application/pdf']
validates_attachment_presence :documento
Expand Down
2 changes: 1 addition & 1 deletion app/models/boletin.rb~
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ class Boletin < ActiveRecord::Base

validates_presence_of :titulo
validates_presence_of :fecha
has_attached_file :documento, :styles => {:pdf_thumbnail => ["", :jpg]},
has_attached_file :documento, :styles => {:pdf_thumbnail => ["", :jpg], :original => ""},
:url => "/assets/boletines/:style/:id_:basename.:extension",
:path => ":rails_root/public/assets/boletines/:style/:id_:basename.:extension",
:default_url => "/vacio.png"
Expand Down

0 comments on commit 3be1955

Please sign in to comment.