Programming in ruby or rials – ror: Understanding function form_for() in Rails on newest questions tagged ruby-on-rails – Stack Overflow

I’m currently reading Beginning Rails 3. I’m coming from PHP and trying to learn Ruby and Rails. I’m looking at a _form partial and I have a few questions. Specifically about the line:

    <%= form_for(@article) do |f| %>

What is the purpose of having the @article object in there as well as what is the function of variable f?

thanks,
mike

See Answers


source: http://stackoverflow.com/questions/10628328/understanding-function-form-for-in-rails
Programming in ruby or rials – ror: programming-in-ruby-or-rials-ror



online applications demo