I am trying to trigger the url where I am passing parameters in the array format
http://localhost:3000/abc/23?field_selectors=['surname', 'firstname']
when I try to get this params it comes in string like
[2] pry(#<PersonController>)> params[:field_selectors]
=> "['surname', 'firstname']"
I tried to remove the "" from both the ends but it again return a string.
"['surname', 'firstname']".chomp('"').reverse.chomp('"').reverse
The above implementation is very idiotic but I tried
Now I am confused how can I covert the given string into an array or how can i get the params directly as an array.
http://localhost:3000/abc/23?field_selectors[]=surname&field_selectors[]=firstname