Form_tag only useful for pages with a single form?

Howdy, I’m new to rails and I’m learning form Agile Web Dev with Rails.
It seems all of the examples that use form_tag use it in situations
where the action first creates a new object before doing a
request.post…

If I’m in a situation where I’m managing Roles, Rights, and assignments
of rights to roles, I may want to have one little form with a text field
and a “Create Role” button, another little form with a text field and a
“Create Right” button, etc… in those situations is there a use for a
form_tag at all? An action can’t presuppose that I’m going to be using
either or, so should I just create separate actions to invoke from the
separate forms (ex ‘create_new_role’, ‘create_new_right’, etc) and then
redirect :back?

Dave S. wrote:

Howdy, I’m new to rails and I’m learning form Agile Web Dev with Rails.
It seems all of the examples that use form_tag use it in situations
where the action first creates a new object before doing a
request.post…

If I’m in a situation where I’m managing Roles, Rights, and assignments
of rights to roles, I may want to have one little form with a text field
and a “Create Role” button, another little form with a text field and a
“Create Right” button, etc… in those situations is there a use for a
form_tag at all? An action can’t presuppose that I’m going to be using
either or, so should I just create separate actions to invoke from the
separate forms (ex ‘create_new_role’, ‘create_new_right’, etc) and then
redirect :back?

Sorry… the question was meant to pertain to form_for, not form_tag.
Since it won’t let me edit, I’m going to repost with an explanatory
subject.

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs