Skip to content

Commit

Permalink
more fixes - cleans upp cable file (despite having fixed it in previo…
Browse files Browse the repository at this point in the history
…us commits/prs)
  • Loading branch information
tochman committed Jul 1, 2018
1 parent acab056 commit 9508d8b
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 7 deletions.
5 changes: 0 additions & 5 deletions app/assets/javascripts/channels/web_notification_channel.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,6 @@ App.notifications = App.cable.subscriptions.create({

disconnected() {
// Called when the subscription has been terminated by the server
// Display the connection has been lost message
this.container().innerHTML = '<p>Disconneced from server</p>'
setTimeout(() => {
this.container().innerHTML = '';
}, 3000);
console.log('Disconneced');
},

Expand Down
2 changes: 1 addition & 1 deletion app/controllers/collections_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ def index
end

def show
@collection = current_user.collection
@collection = current_user.collection.includes(:image)
#@collection.recipes.with_preloaded_image
begin
PdfGeneratorService.new(@collection).generate_pdf
Expand Down
2 changes: 1 addition & 1 deletion app/services/pdf_generator_service.rb
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ def insert_image(pdf, recipe)
image_url = recipe.image.attachment.blob.service_url(expires_in: 1.hour)
#image_url = Rails.application.routes.url_helpers.rails_service_blob_url(recipe.image)
pdf.move_down 10
pdf.image open(image_url), width: 500, position: :center
pdf.image open(image_url), width: 500, position: :center if image_url
pdf.move_down 15
end

Expand Down

0 comments on commit 9508d8b

Please sign in to comment.