Hi, i created a little helper which accepts two Procs/lambda''s for creating a form line which can provide "show" and "edit" functionality (so i only need one partial). in my view i can create a form line like this: line(:label=>"Naam",:show=>lambda{|r| r.name},:edit=>lambda{text_field "organisation", "name",:size=>"50"}) this all works fine, but i am wondering: is this a smart thing to do? a _form partial could contain many proc statements. can it lead to performance problems? regards, remco -- Posted via http://www.ruby-forum.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-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
mmm, zero answers on my last three questions, i am starting to feel a little insecure, am i not formulating my questions correctly? Remco Hh wrote:> Hi, i created a little helper which accepts two Procs/lambda''s for > creating a form line which can provide "show" and "edit" functionality > (so i only need one partial). in my view i can create a form line like > this: > > line(:label=>"Naam",:show=>lambda{|r| r.name},:edit=>lambda{text_field > "organisation", "name",:size=>"50"}) > > this all works fine, but i am wondering: is this a smart thing to do? > a _form partial could contain many proc statements. can it lead to > performance problems? > > regards, > remco-- Posted via http://www.ruby-forum.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-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
On Nov 9, 2007, at 12:45 AM, Remco Hh wrote:>> this all works fine, but i am wondering: is this a smart thing to do? >> a _form partial could contain many proc statements. can it lead to >> performance problems?If performance is your only concern, consider benchmarking. If you don''t plan to serve a gazillion pages, it probably won''t matter anyhow. Just my $.02 --~--~---------~--~----~------------~-------~--~----~ 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-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
Steve Ross wrote:> On Nov 9, 2007, at 12:45 AM, Remco Hh wrote: > >>> this all works fine, but i am wondering: is this a smart thing to do? >>> a _form partial could contain many proc statements. can it lead to >>> performance problems? > > If performance is your only concern, consider benchmarking. If you > don''t plan to serve a gazillion pages, it probably won''t matter anyhow. > > Just my $.02thanks steve, i thought of benchmarking, but i haven''t found a good method/tool for that i will look for it remco -- Posted via http://www.ruby-forum.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-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---