Prev | Current Page 83 | Next

Brad Ediger

"Advanced Rails"

rb:8 if @result
(rdb:1) pp @result
{:point=>
#@m=0.0,
@srid=4326,
@with_m=false,
@with_z=false,
@x=-94.359055,
@y=37.842806,
@z=0.0>,
:address=>"Nevada, MO, USA"}
56 | Chapter 2: ActiveSupport and RailTies
Finally, when we leave the debugger with cont (c), the request continues loading in
the web browser, and our debugger console becomes a server console again.
(rdb:1) c
Rendered /layouts/_nav (0.00012)
Rendered /layouts/_footer (0.00008)
Completed in 39.54861 (0 reqs/sec) | Rendering: 0.01811 (0%) | DB: 0.15506 (0%)
| 200 OK [http://localhost/signup/check_for_service]
Where to Start
Pick something interesting
Don??™t discount the importance of finding something you like and running with it.
This approach has several advantages. It keeps you looking at aspects that interest
you, while taking you across the basic components, such as ActiveSupport, that you
will need to know. You will also pick up the idioms that other Rails programmers
use, and you will probably learn something new in the process.
Learn to love global search. Find an interesting method and search Rails for all of the
places that method is called.
Start at the top
The end of this chapter will explain how Rails initialization works. These functions
provide good entry points for studying the Rails source. You can start from
Initializer and trace a request down through a sequence of calls to your application,
following the same path that Ruby takes when executing your code.


Pages:
71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95