How to save form input to database

I am trying to save the input given by particular user in database. i.e, I have created an application for login. Once the user logged in he will redirect to a page with a text field and submit button. In text field user will type any url, when clicking on submit it should redirect to that url and the url should be saved in db. How to achieve this?

I have used following form feed in the redirection page

<%= form_with scope: :url, local: true do |form| %>

<%= form.label :title %>
<%= form.text_field :title %>

<%= form.submit %> <%= render form.text_field %>

<% end %>

Hello siya,

I would suggest you to start here: