On Jul 5, 2014, at 4:34 PM, Roelof Wobben wrote:

> Hello,
> 
> 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

> 
> 
> -- 
> You received this message because you are subscribed to the Google Groups 
> "Ruby on Rails: Talk" group.
> To unsubscribe from this group and stop receiving emails from it, send an 
> email to rubyonrails-talk+unsubscr...@googlegroups.com.
> To post to this group, send email to rubyonrails-talk@googlegroups.com.
> To view this discussion on the web visit 
> https://groups.google.com/d/msgid/rubyonrails-talk/ac2a3ad4-d379-40f4-a1ba-763f0888b703%40googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.

-- 
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to rubyonrails-talk+unsubscr...@googlegroups.com.
To post to this group, send email to rubyonrails-talk@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/rubyonrails-talk/34F5CB8D-E6CE-4F0B-8B4E-35984B8ADD30%40wdstudio.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to