try to use form_for tag wherever you can, instead of form_tag.