Hi,

Why is it that important for you to understand how that code works, instead
of just taking it as it is?

Respect,
Cezar





*Cu respect,*
*Sirbu Nicolae-Cezar*

*sirbunicolaecezar / gmail.com <sirbunicolaecezar / gmail.com> | web developer
|  **+4 (0767) 508 109*
NOTICE: This email and any file transmitted are confidential and/or legally
privileged and intended only for the person(s) directly addressed. If you
are not the intended recipient, any use, copying, transmission,
distribution, or other forms of dissemination is strictly prohibited. If
you have received this email in error, please notify the sender immediately
and permanently delete the email and files, if any.


On Sat, Jan 4, 2014 at 1:48 AM, Warren Zhang <lists / ruby-forum.com> wrote:

> Andrew,
>
> Thank you for your explanation. I am vaguely understand what you are
> talking about.
>
> This "magic" rails is doing is most difficult part for me. I found few
> literacy explain rail "magic" well. I am reading "agile web development
> with rail" and rails online documents. They both mentioned that for
> example like
>
>     respond_to do |format|
>       format.html # index.html.erb
>       format.xml  { render :xml => @posts }
>     end
>
> controller will respond to user either html or xml with the right format
> provided by request url. That's it. They don't explain why these two
> statements will not be executed sequentially or anything behind the
> scene. I have big difficult time to understand since I am coming from a
> c++, python world.
>
> How can I accrue my knowledge on this "magic"? Any in depth
> books/documents I can refer to?
>
> --
> Posted via http://www.ruby-forum.com/.
>