C
Clay Culver
Sorry for the complete newbie question, but this seems like it should
be so obvious. I've created a Controller called Welcome. The
welcome_controller.rb contains this:
class WelcomeController < ApplicationController
def index
@response = "hello world"
end
end
I have a view for welcome called "index.rhtml" that contains this:
<html>
<head>
<title>Test</html>
</head>
<body>
<%= @responce %>
</body>
</html>
This seems like it would be a no brainer, but when I go to the page I
get this error:
undefined method `headers' for "":String
Extracted source (around line #46):
43:
44:
45: <h2 style="margin-top: 30px">Response</h2>
46: <b>Headers</b>: <%=h @response.headers.inspect.gsub(/,/, ",\n")
%><br/>
be so obvious. I've created a Controller called Welcome. The
welcome_controller.rb contains this:
class WelcomeController < ApplicationController
def index
@response = "hello world"
end
end
I have a view for welcome called "index.rhtml" that contains this:
<html>
<head>
<title>Test</html>
</head>
<body>
<%= @responce %>
</body>
</html>
This seems like it would be a no brainer, but when I go to the page I
get this error:
undefined method `headers' for "":String
Extracted source (around line #46):
43:
44:
45: <h2 style="margin-top: 30px">Response</h2>
46: <b>Headers</b>: <%=h @response.headers.inspect.gsub(/,/, ",\n")
%><br/>