Skip to content

Commit

Permalink
Random old changes
Browse files Browse the repository at this point in the history
  • Loading branch information
dsomel21 committed Feb 14, 2024
1 parent 90eff6f commit 7f68a83
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 0 deletions.
1 change: 1 addition & 0 deletions app/controllers/books_controller.rb
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
# frozen_string_literal: true

class BooksController < ApplicationController
# NOTE: Remember to see .jbuilder
def index
@books = Book.all
end
Expand Down
12 changes: 12 additions & 0 deletions app/models/chapter.rb
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,18 @@ def copy_paste_info
Rails.logger.debug info
end

def copy_paste_artwork_alt_text
info = <<~HEREDOC
{https://spg.dev/chapters/#{self.id}}
Artwork for chapter #{self.number} of #{self.book.en_title}, titled: “#{self.en_title}.”
#{self.en_short_summary}
HEREDOC

Rails.logger.debug info
end

def csv_rows
file_path = "lib/imports/#{self.book.sequence}/#{self.number}.csv"

Expand Down

0 comments on commit 7f68a83

Please sign in to comment.