Thursday, April 21, 2011

Insert form buttons outside a form

Is there a Rails library that allows you to insert form buttons and use them as hyperlinks instead? I think I've seen it somewhere before.

From stackoverflow
  • Yes, you can use button_to, but in general it's not a great idea.

    The button_to helper is implemented as a form POST by default, which means it's a bad choice for actions that aren't idempotent (i.e. regular GET actions). Stick to links as much as possible.

    Matthew Schinckel : Agreed. If it must look button-like, then use CSS.
    alamodey : Cool. Is there a way to style it and make these buttons/fonts bigger?
    alamodey : And when I use consecutive button_to's, they go on separate lines. Is there a way to keep them side by side?

0 comments:

Post a Comment