Marnen Laibow-Koser wrote: >> 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.
yes, what i meant was something like with_model_give_form (@story) do |f| f.begin_form f.text_field :name f.end_form end except the begin_form and end_form can be called within "with_model_give_form", so it can become with_model_give_form (@story) do |f| f.text_field :name end so it is now the same thing as form_for -- 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 -~----------~----~----~----~------~----~------~--~---