Sorry - working on a simple tutorial but something is throwing me
here. I’m supposed to get a Time.now() print to the page but it’s not
working and I can’t figure out why.
No errors are thrown my the page shows:
Howdy, world! My name is Stuart Felenstein.
This was verified at .
So no time stamp showing. I went into IRB , did a Time.now() and it’s
working there so am I missing something ?
In my controller:
class NamerController < ApplicationController
def index @my_name = ‘Stuart’
end
def timestamped @my_name = ‘Stuart’ @the_timestamp = Time.now()
end
end
In my view
I'm timestamped at <%= @the_timestamp %>
Howdy, world! My name is <%= @my_name %>.
This was verified at <%= @the_timestamp %>.
Are you sure you’re running the timestamped action to produce the
view? If you’re looking at index.rhtml, your timestamped action is not
getting called.
Well creating the timestamp view didn’t come till later in the
tutorial, although the screenshots showed it should have displayed in
the index.rhtml.
Now that’s I’ve created the timestamp.rhtml it is working there.
I have a feeling though this tutorial isn’t ready for primetime.