I like to have a grid where I can display all the users. On that form
there
is a edit button.
So I like to choose a user and when I press edit then a form where I
can
edit the user data.
I like to have a grid where I can display all the users. On that form there
is a edit button.
So I like to choose a user and when I press edit then a form where I can
edit the user data.
Is this possible and how can I achieve it.
Yes of course it is possible. Almost any such thing can be
accomplished. First work out how you would do it using html,
javascript and css (or whatever), then create the views and code to
generate that.
If you don’t know enough to describe the html, javascript and css then
this is not the right list to ask, but probably you need to read some
books on those technologies.
I like to have a grid where I can display all the users. On that form there is a
edit button.
So I like to choose a user and when I press edit then a form where I can edit
the user data.
Is this possible and how can I achieve it.
Roelof
This is basic stuff, easily managed in Rails. The key to any enhancement
like this is to start with the basic CRUD views, such that you show your
list of users, click an edit link on the individual user in the list, go
to a separate page where you show the form, fill out the form, save
changes, and then go back to the list (or show the user, makes no
difference at this point). rails generate scaffold whatever will get you
this far with zero effort.
Once you have the basics completed such that you can make changes and
persist them, then you can layer the Ajax routes on top of that. Rails
provides the remote: true flag pretty much everywhere you may need it
(link_to, form_for) to accomplish this trick. Bringing up your edit form
in an overlay (lightbox) instead of a separate page is a simple matter
of adding an edit.js.erb file to render the view.
Walter
This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.