apardes
apardes

Reputation: 4380

Ruby on Rails simple_forms RESTful requests

I'm getting started with Ruby on Rails and simple_forms and I am trying to figure out how to set the HTTP method used to send the request. I'm not finding any way to explicitly set the HTTP method. I'm not sure if this is something I am overlooking in Rails but I cannot find any reference to HTTP methods in the simple_forms documentation.

Thanks for your help.

Upvotes: 0

Views: 51

Answers (1)

Eyeslandic
Eyeslandic

Reputation: 14900

simple_form_for @user, method: :post

Rails however automatically user the appropriate method for inserts, updates and deletes.

EDIT: Link to the docs http://apidock.com/rails/ActionView/Helpers/FormHelper/form_for

simple_form inherits from the default form builder so you get all the goodies along by default.

Upvotes: 1

Related Questions