19 May 13:15
Re: Cleanest syntax for form partial?
From: Rick DeNatale <rick.denatale@...>
Subject: Re: Cleanest syntax for form partial?
Newsgroups: gmane.comp.lang.ruby.rails
Date: 2008-05-19 11:15:11 GMT
Subject: Re: Cleanest syntax for form partial?
Newsgroups: gmane.comp.lang.ruby.rails
Date: 2008-05-19 11:15:11 GMT
On Sun, May 18, 2008 at 10:05 PM, Ryan Bigg (Radar) <radarlistener@...> wrote: > <% form_for ... do |@f| %> > <%= render :partial => "form" %> > <% end %> > > Even cleaner! Passing in your form object as an instance variable gives you > the added bonus of having it available in any partial you render after > defining it. Cleanliness is in the eye of the beholder. In any case, beware that Ruby 1.9 disallows using instance variables as block parameters, so if you're forward thinking this might be a technique to avoid. -- -- Rick DeNatale My blog on Ruby http://talklikeaduck.denhaven2.com/ --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk@... To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe@... For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
RSS Feed