I am new to ruby on rails and I am trying to create a small website as practice. Right now I am in the process of creating a Contact page. Basically this page will be a form to allow visitors send an email to only me. This form will have name, message, subject and other information a typical contact me page will have. I am new and I’m not sure where to start. Could someone guide me through this process? I am open to gems but I am also curious on how to perform this action without gems so I can learn more about the rails framework. Thanks!
Create a model Contact:
rails g model contact name:string subject:string message:text
Create a controller contacts
rails g controller contacts
add routes
routes :contacts
Create a view page
new.html.erb
Start by working right through a good tutorial such as railstutorial.org (which is free to use online). That will show you the basics of Rails.
Colin
You should create virtual model in case of contact page as you are not going to store contact information in database.