Nees Rhtml Book

Hi,
  Please, Any body have, rhtml tutorials/urls to study.

                    Or

  Where I can get it?

                   Thanks

···

--
Posted via http://www.ruby-forum.com/.

Saravanankumar Saravanan wrote:

Hi,
  Please, Any body have, rhtml tutorials/urls to study.

                    Or

  Where I can get it?

                   Thanks

Saravanankumar,

There is no magic for rhtml as it's simply ruby embedded within html.
Just pick up a good book on html and css to which there are thousands
and you will be all set..

hope this helps

ilan

···

--
Posted via http://www.ruby-forum.com/\.

I am wondering, based on this and the previous post, whether you are
actually using Ruby on Rails?

If so, you may be better placed asking questions on the Rails mailing list
(you are currently on the Ruby language mailing list).

In any case, invest in a good book or two. I have found "Programming Ruby:
The Pragmatic Programmer's Guide" and "Agile Web Development with Rails" to
be invaluable. The latter has lots of rhtml and ajax examples.

Whilst these may be hard to find in India, the good news is that they are
available to buy online in PDF form - and much cheaper than the paper
versions.

Also, an older version of Programming Ruby is available for free on-line:
http://www.rubycentral.com/book/

HTH,

Brian.

···

On Mon, Mar 19, 2007 at 09:19:50PM +0900, Saravanankumar Saravanan wrote:

  Please, Any body have, rhtml tutorials/urls to study.

Saravanankumar Saravanan wrote:

Hi,
  Please, Any body have, rhtml tutorials/urls to study.

                    Or

  Where I can get it?

                   Thanks

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.

I am just learning all this stuff to, i just started like 1 week ago
learning both ruby and ruby on rails, the book i am using is called
"Beginning Ruby on Rails" by Holzner Ph.d, its published by WROX, its
pretty good so far.

···

--
Posted via http://www.ruby-forum.com/\.

Ilan Berci wrote:

Saravanankumar Saravanan wrote:

Hi,
  Please, Any body have, rhtml tutorials/urls to study.

                    Or

  Where I can get it?

                   Thanks

Saravanankumar,

There is no magic for rhtml as it's simply ruby embedded within html.
Just pick up a good book on html and css to which there are thousands
and you will be all set..

hope this helps

ilan

Yeah.
  I understood, about "ruby embedded html".

            Thank U for ur reply.

···

--
Posted via http://www.ruby-forum.com/\.

I will give you one last hint before you realize you need to just learn the basic stuff or use a CMS:
as stated,
rhtml is just html with Puby code in it.
users never see the ruby it's parsed by the server
If you use Perl, Python, or PHP you can have phtml
the secret is, you can actually name the file with any extension (almost) or no extension.
the web browser (user-agent) doesn't care (isn't supposed to, anyway)
the main information for the user-agent is in the header of the file.

so the only tutorial on rhtml is learning Ruby (or Rails) enough to use eRuby in one of its forms.
ERb, eRuby, eRubis

···

On Mar 20, 2007, at 9:37 AM, Corey Konrad wrote:

Saravanankumar Saravanan wrote:

Hi,
  Please, Any body have, rhtml tutorials/urls to study.

                    Or

  Where I can get it?

                   Thanks

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.

I am just learning all this stuff to, i just started like 1 week ago
learning both ruby and ruby on rails, the book i am using is called
"Beginning Ruby on Rails" by Holzner Ph.d, its published by WROX, its
pretty good so far.

--
Posted via http://www.ruby-forum.com/\.

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.

···

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.

--
Rick DeNatale

My blog on Ruby
http://talklikeaduck.denhaven2.com/

Saravanankumar Saravanan wrote:

Ilan Berci wrote:

Saravanankumar Saravanan wrote:

Hi,
  Please, Any body have, rhtml tutorials/urls to study.

                    Or

  Where I can get it?

                   Thanks

Saravanankumar,

There is no magic for rhtml as it's simply ruby embedded within html.
Just pick up a good book on html and css to which there are thousands
and you will be all set..

hope this helps

ilan

Yeah.
  I understood, about "ruby embedded html".

            Thank U for ur reply.

Hello,
   Definately there is no magic in RHTML.
If you want to help in RHTML the check it out the following links. May
it will help you.

1. http://webddj.sys-con.com/read/223793.htm
2. http://www.railshosting.org/
3. http://www.vtc.com/products/rubyonrails.htm

Thanks :slight_smile:
Deepak

···

--
Posted via http://www.ruby-forum.com/\.

You could use eRuby with any .extension
In fact you could serve web pages with any or no dot extension.
The key is that the server knows what to do with it.
An example is Apache. You tell Apache what to do with files of various extensions. You could tell it to parse all .html files with Ruby, or all .php files with Perl.
Thus, many rails pages show URL/URI with no dot extension at all in the web browser. It is important only if you use multiple language interpreters or your web application framework requires it.

···

On Mar 21, 2007, at 1:38 AM, Rick DeNatale wrote:

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/

That's not entirely true; if you're using eRb with Rails, it requires
that templates end in rhtml or erb. Otherwise, you could coceivably
use it without an extension.

--Jeremy

···

On 3/20/07, John Joyce <dangerwillrobinsondanger@gmail.com> wrote:

You could use eRuby with any .extension
In fact you could serve web pages with any or no dot extension.
The key is that the server knows what to do with it.
An example is Apache. You tell Apache what to do with files of
various extensions. You could tell it to parse all .html files with
Ruby, or all .php files with Perl.
Thus, many rails pages show URL/URI with no dot extension at all in
the web browser. It is important only if you use multiple language
interpreters or your web application framework requires it.

On Mar 21, 2007, at 1:38 AM, Rick DeNatale wrote:

> 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/
>

--
http://www.jeremymcanally.com/

My free Ruby e-book:
http://www.humblelittlerubybook.com/book/

My blogs:

http://www.rubyinpractice.com/

Right, and in fact, rails URL/URIs typically don't have a dot
extension. It's action pack which is looking at the files not Apache.
The extension comes into play when the controller renders a view.
Then Rails looks for a template file to render using conventions. E.g.
if the FooController#display action renders, say, it's default view,
the template will be looked for in app/views and if display.rhtml is
found it will get processed by eRuby to produce the body of the HTTP
response, or if display.rxml is found it will be processed by Builder.
You can register template processors to handle other kinds of template
files.

And Rails uses eRuby for other things, for example it runs
config/database.yml through eRuby which lets you do a certain amount
of dynamic configuration.

···

On 3/20/07, John Joyce <dangerwillrobinsondanger@gmail.com> wrote:

You could use eRuby with any .extension
In fact you could serve web pages with any or no dot extension.
The key is that the server knows what to do with it.
An example is Apache. You tell Apache what to do with files of
various extensions. You could tell it to parse all .html files with
Ruby, or all .php files with Perl.
Thus, many rails pages show URL/URI with no dot extension at all in
the web browser. It is important only if you use multiple language
interpreters or your web application framework requires it.

--
Rick DeNatale

My blog on Ruby
http://talklikeaduck.denhaven2.com/

Read the whole post again and notice the part above.
It is entirely true.
Rails is a web application framework that requires it. It doesn't have to though. It doesn't even have to use ERb, it can use one of the other eRuby implementations such as eRubis. But these things take tinkering. Configuration.

···

On Mar 21, 2007, at 2:44 AM, Jeremy McAnally wrote:

That's not entirely true; if you're using eRb with Rails, it requires
that templates end in rhtml or erb. Otherwise, you could coceivably
use it without an extension.

--Jeremy

On 3/20/07, John Joyce <dangerwillrobinsondanger@gmail.com> wrote:

...It is important only if you use multiple language
interpreters or your web application framework requires it.