Walter Davis wrote in post #1150186:
> On Jun 19, 2014, at 2:09 AM, Ronald Fischer wrote:
>
>> Does this mean that I can't solve this with a *button*, but would have
>> to use a *link* instead?
>
> It's important to note that you may style a link to look like anything
> -- even a button. But you cannot remove the button-ness from an actual
> button and have it do anything besides submit the form containing it.
I see. Maybe I'm using the wrong design here in the first place. Here is
what I am going to do:
The user arrives the web page in question, from an overview page. The
overview page gives a list of all instances (in this case, of type
Card), by listing only the primary key of the instance. When the user
clicks on one of those keys, s/he arrives at a page displaying all the
data for this Card instance.
At this point, I will give the user three choices:
- delete the Card
- edit the Card
- show again the "list of all cards"
My (probably stupid) idea was to write a "form" without input fields,
showing only the information on the cards, and having 3 buttons for
DELETE, EDIT and LIST.
Now I understand that a submit button in a form helper for a form_for,
which has as argument an existing object, automatically calls the
"update" function. Thinking about it, this makes sense, and I now think
that I was misusing the form_for().
Maybe I should just output the data without using a form at all, and use
button_to() if I want the clickable part look or behave like buttons, or
use links and style them as buttons, as you pointed out. In any case,
using a form in my particular case, doesn't make much sense. Would you
agree on that?