I'm trying to add country selection in Devise registration and I use country_select gem from https://github.com/stefanpenner/country_select#example
There explains the simple usage by using country_select("user", "country")
use model and attribute as parameters:
Problem: When I push submit button user was created and Everything is good except country column doesn't has data from my selection
Purpose: After submit registration I want to insert country which I have selected from Signup form into database(table: users, column: country) also
sign_up.html.erb
<h2><center>Sign up</center></h2>
<%= simple_form_for(resource, as: resource_name, url: registration_path(resource_name)) do |f| %>
<%= f.error_notification %>
<div class="form-inputs" style="float; margin:0 auto;width:35%">
<%= f.input :email, required: true, autofocus: true %>
<%= f.input :password, required: true %>
<%= f.input :password_confirmation, required: true %>
<%= f.label :country %>
<%= country_select("user", "country") %> <<-- My model's name is user.rb and in my users table has a country column
</div>
<div class="form-actions" style="float; margin:0 auto;width:10%">
<%= f.button :submit, "Sign up" %>
</div>
<% end %>
**My model's name is user.rb and in my users table has a country column
Thanks for advance