From: Rick DeNatale Date: 2007-03-21T01:38:29+09:00 Subject: Re: Nees Rhtml Book On 3/19/07, Corey Konrad <0011@hush.com> wrote: > yeah rhtml is just html the r part of it is just there to tell rails > that the name of the rhtml file is the name of an action. Not really, the rhtml tells rails (or more precisely ActionView) that the file needs to be processed by erb. It really doesn't tell it that it's the name of an action, although if rails doesn't find an action method in the controller, it will by default look for a file to render in app/views/controller_name. This file can be an rhtml file or something else (like a simple html file). Rhtml is html with embedded ruby. It does get processed on the server side by erb, or an equivalent program. What basically happens is that it get's turned into ruby code which writes out the html portions interspersed with the output from the embedded ruby code. There's not much to it in normal usage. The key concepts are that ruby code gets embedded within <% %> pairs, If the first <% is followed by an = sign, then the value of the ruby expression following is inserted into the output. The client browser never sees the rhtml, only the (x)html which results from running erb. -- Rick DeNatale My blog on Ruby http://talklikeaduck.denhaven2.com/