I'm trying to take in an array of numbers through the use of a form. In my database I have the variable as:
t.integer  "home_goal_min", default: [],  array: true
In my form I have:
<%= f.label :minutes_of_home_team_goals %>
<%= f.fields_for 'home_goal_min[]', [] do |p| %>
    <%= f.number_field :home_goal_min %>
    <%= f.number_field :home_goal_min %>
<% end %>
In my controller I also added in the parameter as an array but this still hasn't solved my problem:
def result_params
        params.require(:result).permit(:home_result, :away_result, {:home_goal_min => []}, {:away_goal_min => []})
    end
However, when I use the form and enter data, I then proceed to check the database through the console but it still appears empty and I just get: home_goal_min: []
I'm wondering what I need to do to get the numbers entered in the form to be saved in the database?
Also is there a quick way to have the form part for home_goal_min as a text field and allow the user to enter the numbers split by comma, for example as: "23,45,52" would populate home_goal_min with the array [23,45,52]