Skip to main content
added 40 characters in body
Source Link
Mladen Ilić
  • 1.8k
  • 1
  • 19
  • 22

How about using rails_ujs and simply do the following:

Rails.fire(form, 'submit'); 

(where Rails.fire(form, 'submit'); is a DOM Element)

This feels like a proper Rails way to do it.

You can checcheck out the source here – https://github.com/rails/rails/blob/master/actionview/app/assets/javascripts/rails-ujs/utils/event.coffee#L34

How about using rails_ujs and simply do the following:

Rails.fire(form, 'submit');

This feels like a proper Rails way to do it.

You can chec out the source here – https://github.com/rails/rails/blob/master/actionview/app/assets/javascripts/rails-ujs/utils/event.coffee#L34

How about using rails_ujs and simply do the following:

Rails.fire(form, 'submit'); 

(where form is a DOM Element)

This feels like a proper Rails way to do it.

You can check out the source here – https://github.com/rails/rails/blob/master/actionview/app/assets/javascripts/rails-ujs/utils/event.coffee#L34

Add link to source
Source Link
Mladen Ilić
  • 1.8k
  • 1
  • 19
  • 22

How about using rails_ujs and simply do the following:

Rails.fire(form, 'submit');

This feels like a proper Rails way to do it.

You can chec out the source here – https://github.com/rails/rails/blob/master/actionview/app/assets/javascripts/rails-ujs/utils/event.coffee#L34

How about simply:

Rails.fire(form, 'submit');

This feels like proper Rails way to do it.

How about using rails_ujs and simply do the following:

Rails.fire(form, 'submit');

This feels like a proper Rails way to do it.

You can chec out the source here – https://github.com/rails/rails/blob/master/actionview/app/assets/javascripts/rails-ujs/utils/event.coffee#L34

Source Link
Mladen Ilić
  • 1.8k
  • 1
  • 19
  • 22

How about simply:

Rails.fire(form, 'submit');

This feels like proper Rails way to do it.