yrkapil wrote in post #1050834:
> I am trying to implement an flexigrid in ruby on rails...
> I am successful in implementing the flexigrid code..
> Then i tried to implement a dialog box for "New User" .. It worked
> fine .. When i click on the Add New User the _form.html.erb loads into
> the dialog box ..
> My problem is that when i tried to implement the Edit button in the
> flexigrid which should open the edit.html.erb for that particular
> user ..
> I need to pass the id to the ruby code where it opens the edit form in
> the dialog box .. Please help me guys .. I am new to ruby on rails ..
> Please do not mind if my question is wrong..
> I am able to it in the controller but dialog box is not possible...
>
> Please help me guys ...

This first thing you should do is move your JavaScript out of your HTML. 
Behavior should be separated from the view, just as styling should be 
separated from structure. Rails is best used with Unobtrusive JavaScript 
(UJS) and has good support for moving data between the Ruby and 
JavaScript worlds.

Ryan Bates has created a Railscast that shows a few different options to 
accomplish what you need.

http://railscasts.com/episodes/324-passing-data-to-javascript?autoplay=true

-- 
Posted via http://www.ruby-forum.com/.

-- 
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Talk" group.
To post to this group, send email to rubyonrails-talk@googlegroups.com.
To unsubscribe from this group, send email to 
rubyonrails-talk+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en.

Reply via email to