SpringFlowers AutumnMoon wrote: [...] > can i use something like: (just pseudo code) > > with (@story) do |f| > f.begin_form > f.textfield :name > f.end_form > end
You already are. Just replace "with" with "form_for" and you'll see that the syntax is essentially the same. > > so i think the block method will save the begin_form and end_form > because it automatically add the begin and end before calling the block. > is that the main benefit? Oh, now I see what you mean about the syntax. Yes, that's sort of it. Read more about blocks in Ruby. Best, -- Marnen Laibow-Koser http://www.marnen.org mar...@marnen.org -- 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@googlegroups.com To unsubscribe from this group, send email to rubyonrails-talk+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---