I am getting this error in following code
link_to params.to_h.merge(query_hash), options do
raw("#{title} " + fa_icon(icon))
end
To fix it i tried following things which didn't work mentioned here
request.parameters.merge(query_hash)
also
safe_params = params.permit(params.keys.flatten)
link_to safe_params.to_h.merge(query_hash), options do
raw("#{title} " + fa_icon(icon))
end
But nothing works for me, has anybody gone through such error. Any help is appreciated.
I know this is a late response but I had a similar problem and found a solution so it may be helpful to others.
I had a similar issue with a link where I was passing the ransack parameters in Active Admin. My link to looked similar to yours:
Even though I had set the strong parameters, as per the documentation, I kept getting the same error. The only way I could get this to work was to force the parameter to be permitted using this directly before the link_to.
It is effectively doing the same thing as strong params would in allowing anything in the "q" parameter(s).