Basically we are going to retrieve the details from database (in my case its employee name & their number) and assign it to an array.
Then we populate that array to the select
# /app/views/payslips/index.html.erb
<% emp_array = Employee.all.map { |emp| [emp.name, emp.emp_no] } %>
<%= f.select :emp_no, options_for_select(emp_array) %>