<h1>Poem Example</h1> <p><%= @file_name %></p> <pre> <%= @poem %> </pre>
class RavenController < ApplicationController def show @file_name = Rails.root.join 'app', 'assets', 'files', 'poem.txt' @poem = "" File.open(@file_name, "r") do |f| while line = f.gets @poem += line end end end end
* { font: normal 150% Chiller; background-color: black; color: orange; }
http://localhost:3000/raven/show