Button function in rails

I want to create a button function on a main page that updates the
database, without having to open the form and editing and updating
through the form.

Anyone know how to do this, if it is possible?

Thanks in advance for any help you can provide.

On 23 August 2010 21:16, Ithelp Eighty-five [email protected]
wrote:

I want to create a button function on a main page that updates the
database, without having to open the form and editing and updating
through the form.

Do you mean you want just a button to appear, which when pressed posts
some data to the edit method in the controller?

If so just provide an empty form with a submit button which posts to
the appropriate action, putting the data you want submitted in hidden
fields in the form. Then all the user will see is the button.

Colin

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