Answer the question
In order to leave comments, you need to log in
How to create mail contact form without working with database and controllers?
Hello. I was faced with the task of creating a regular contact form, where you need to specify a name, email, subject and the message itself. I googled and also came across a question on stackoverflow .
The problem is that a database is screwed up for all this when a controller is created for the work of sending mail, but by and large I don’t need this. I just need to take the data from the form (name, mail, subject and the message itself) check for validity (the length of the name, message and that the fields are filled) and just send. I don't need to fix something in the database, let alone work with it.
How to solve it?
Answer the question
In order to leave comments, you need to log in
FormObjects - https://robots.thoughtbot.com/activemodel-form-objects
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question