开发者

Ruby on Rails 3 - Create a popup (or something like that) to submit a form


Hello people

I have a problem here. I don't know much about JS or Jquery, but right now 开发者_如何学GoI need to use them.

I have a model (in Ruby on rails 3.0.9) User. The table for users has the following fields

users

  • id
  • first_name
  • last_name
  • email

When I register a new user, then I'm redirected to the "Show" view, in that view I can choose: go to "index" or go to "edit", if I choose "edit" I'm redirected to the "edit" view, but I don't want to be redirected, I want to be able to load a kind of "popup" instead, with the same functionality of "edit".

Do you have an example of this? Can you help me, please?


To make things easy, I would just call whatever page you want via a jQuery lightbox. Most lightbox allows you to open another page using a layover, without having to redirect. I have used Colorbox and love it.

Just store some hidden page or div in your application.html.erb, then you have a site-wide login page.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜