I like it.  Although I wouldn't worry about having a single exit point from
the function.  If you just say if () { return ....} else { return ...} that
cuts the number of lines in half. :)

-Fred

On Mon, Jun 30, 2008 at 11:47 AM, mr_justin <[EMAIL PROTECTED]> wrote:

>
> Was playing around with this some more, and realized I my best option
> is to just attempt to fetch the element in question. Makes for a
> pretty quick operation if the ID is present, otherwise the alternate
> method would be crawling back up the DOM from the element to find the
> body element (assuming the body has not been removed).
>
> This seems to do the trick: http://pastie.org/224848


-- 
Science answers questions; philosophy questions answers.

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Spinoffs" group.
To post to this group, send email to rubyonrails-spinoffs@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-spinoffs?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to