[next][first] [1] [2] [3] [4] [5] [6] [7] [8] [9] [10] [11] [12] [13] [14] [15] [16] [17] [18] [19] [20] [21] [22] [23] [24] [25] [26] [27] [28] [29] [30] [31] [32] [last]


Add some code to the controller, adding to the standard one!

[trainee@daffodil railsdemo]$ vi app/controllers/ilib_controller.rb

And you enter:

class IlibController < ApplicationController

def greeting

@month = Time.new.month

end

end

You can see that the action exists by browsing to it ...

http://daffodil:3000/ilib/greeting

but you'll be told that the template is missing. That's fair enough as you haven't defined a view you, and you can check that the URL is seen as a valid one by seeing that you get a different message with a made-up URL.




Training sample © 2024, WELL HOUSE CONSULTANTS LTD
This is http://www.wellho.net/demo/which.html
Well House Manor • 48 Spa Road • Melksham, Wiltshire • United Kingdom • SN12 7NY
Phone: +44 (0) 1225 708 225 • EMAIL: info@wellho.net • WEB: http://www.wellho.net