I am doing
if params[:type] = "Type A"
# do something
end
if params[:type] = "Type B"
# do something
end
But I think that is wrong. I should be using ==
However that gives me error:
You have nil object when you didn't expect it
What is the best way to do this in rails?
All I am doing is getting a radio button variable from a form and doing logic based on its value (either Type A or Type B)