[TIP] optional multi-pane layout

2008-08-28 Thread zimbatm
This is a nice little trick to defer some block execution in a multi-pane layout module Views def layout html do #... body do div.main { yield } div.right! @_right_pane if @_right_pane end end end def _right_pane(block) @_right_pane = block

Re: [TIP] optional multi-pane layout

2008-08-28 Thread John Beppu
That's pretty damned cool. Good technique! --beppu On Thu, Aug 28, 2008 at 3:46 AM, zimbatm [EMAIL PROTECTED] wrote: This is a nice little trick to defer some block execution in a multi-pane layout module Views def layout html do #... body do div.main { yield }

Re: [TIP] optional multi-pane layout

2008-08-28 Thread Eric Mill
That's an awesome tip for Markaby. I'll remember that! On Thu, Aug 28, 2008 at 7:57 AM, John Beppu [EMAIL PROTECTED] wrote: That's pretty damned cool. Good technique! --beppu On Thu, Aug 28, 2008 at 3:46 AM, zimbatm [EMAIL PROTECTED] wrote: This is a nice little trick to defer some block

Camping::Apps returns!

2008-08-28 Thread Magnus Holm
Camping::Apps is back! I don't know the *exact* reason it was being removed, but now it's a monkey-patched array which at least doesn't leak memory when using together with the reloader (were there more problems with this?). I really think we need this, since there's no guaranty that only

Re: Camping::Apps returns!

2008-08-28 Thread zimbatm
Hi Magnus, If I remember well, I am the one who introduced AND removed Camping::Apps. I'm not sure anymore but I think it wasn't really used and that solutions never really satisfied me. Do you have any use for it ? Cheers, zimbatm ___ Camping-list

Re: Camping::Apps returns!

2008-08-28 Thread Magnus Holm
Well, it's being used in mab.rb and ar.rb: Old way: Object.constants.map{|c|Object.const_get(c)}.each do |c| c::Models.module_eval $AR_EXTRAS if c.respond_to?(:goes) end New way: Camping::Apps.each do |c| c::Models.module_eval $AR_EXTRAS end Which may break if you got another class/module

Re: Camping::Apps returns!

2008-08-28 Thread Aria Stewart
On Aug 28, 2008, at 1:54 PM, zimbatm wrote: Hi Magnus, If I remember well, I am the one who introduced AND removed Camping::Apps. I'm not sure anymore but I think it wasn't really used and that solutions never really satisfied me. Do you have any use for it ? I most certainly do. In

Comment on f658399b7512337f2b0f1d34264214a690404772

2008-08-28 Thread zimbatm
Or how two chars make the difference. A tale on my current project. While debugging a current app, I decided to start camping with $DEBUG = true. Suddenly, while loading a page, exceptions I have never seen started flowing in the console like the crocodiles in the river of the frogger game. This