when we have validate_presence_of :name in the model and then when we
put in the create action that we re-render ‘new’, then the form_for will
populate the fields, and error_messages_for ‘story’ will have the
correct error message.
this is really great, and and the same time, this looks like magic… i
found that many books don’t explain how the magic occur. is it by some
when the form_for is called… is it using the @story that came back
from the @story.save, instead of the @story = Story.new from the new
sometimes i feel that i am playing magic when using Ruby on Rails,
except I don’t know how the magic happens… kind of like if I make the
rabbit appear, but I don’t know how I did it. So I really want to know
the inner workings of Rails.