diff --git a/app/models/chapter.rb b/app/models/chapter.rb index df34832..b2b0c6d 100644 --- a/app/models/chapter.rb +++ b/app/models/chapter.rb @@ -22,7 +22,7 @@ def csv_rows file_path = "lib/imports/#{self.book.sequence}/#{self.number}.csv" unless File.exist?(file_path) - puts "CSV file #{file_path} not found. " + Pastel.new.red.on_bright_white.bold("Are you sure you added it to #{file_path}?") + Rails.logger.debug "CSV file #{file_path} not found. " + Pastel.new.red.on_bright_white.bold("Are you sure you added it to #{file_path}?") raise "CSV file #{file_path} not found. " end diff --git a/config/application.rb b/config/application.rb index 0bd5a52..c9c34b2 100644 --- a/config/application.rb +++ b/config/application.rb @@ -27,7 +27,7 @@ class Application < Rails::Application config.middleware.insert_before 0, Rack::Cors do allow do - origins 'https://spg.dev', /\A.*\.netlify\.app\z/ + origins 'https://spg.dev', /\A.*\.netlify\.app\z/, 'localhost:3000' resource '*', headers: :any,