You are here: Forums Ask a Rails expert How to pass form input to the ...
Posted in Forums : Ask a Rails expert
Authority 0
Posting Rating 0
Sign in to rate this post
|
At work I am currently developing this website on ruby on rails and I got stuck. I created a form, using html but now I want to pass the data entered in the form to the Controller to save it to the db. How would I pass the two fields to the controller, assuming I have a database called “Booking”. Thanks |
Authority 62
Posting Rating 78
Sign in to rate this post
|
The passed input values will be in the params hash, keyed as such. params[‘name’] and params[‘email’] will retrieve the values. |
Authority 0
Posting Rating 0
Sign in to rate this post
|
in controller u can write Assuming u have db called Booking n table name is booking and fields are name n email.Den def create |
Authority 0
Posting Rating 0
Sign in to rate this post
|
thanks |
Ask a Rails expert : nested application ApplicationController get called intead of children::ApplicationController
Ask a Rails expert : Best way to structure a database for a large/static dataset
Ask a Rails expert : Ruby Developer (ROR) - Scottish based (Remote working from within the UK)
Ask a Rails expert : Above Ground Pool Supplies
Ask a Rails expert : How to get url params in observer or model in Rails 3.1
Ask a Rails expert : What can persuade you to hire Junior Ruby devs with significant PHP experience?
Ask a Rails expert : What industry value does the Ruby or Rails Certification currently have?
Ask a Rails expert : Louis Vuitton Damier Azur Canvas specially sale ( www.salecheaplouisvuitton.com )
Ask a Rails expert : ·How to check errors/puts statements from ruby files which are under cronob
Ask a Rails expert : Louis Vuitton cheap Soft Sided Luggagespecial offer( www.salecheaplouisvuitton.com )