hadn't thought of partials. So how would I call a partial from a helper? thanks, Jon
On Jan 4, 2:55 pm, "Tze Yang Ng" <[email protected]> wrote: > Just wondering, why not use partial instead? either directly or called > from within the helper ? it seems more elegant this way. > > TY > > == > > > > On Sun, Jan 4, 2009 at 1:42 PM, Jon Hancock <[email protected]> wrote: > > > I am trying to figure out if its easy to combine several common > > helpers into one. > > > For example, > > a common set of helpers for a form looks like this: > > > <%= form_for @relay_session, :action => url(:update) do %> > > <fieldset> > > <legend> <%= page_title -%> </legend> > > <%= error_messages_for @relay_session %> > > > ... contents... > > </fieldset> > > <% end =%> > > > I would like to write a helper that combines the form, fieldset, and > > legend in one helper. Yes, I know there is another fieldset helper > > I'm not using yet. > > > My question leads to if its easy to do what I need based on how the > > current helper code is factored. > > > I want to write a helper that combines several like: > > <%= form_for @relay_session, :legend => "my user", :action => url > > (:update) do %> > > > any ideas? I've played around with it a bit but don't see anything > > obvious. > > > thanks, Jon > > --http://ngty77.blogspot.com --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "merb" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/merb?hl=en -~----------~----~----~----~------~----~------~--~---
