I have an instance variable called
@filtered_ratings = params[:ratings].keys
However, if params[:ratings] is nil and #keys is called on it there is an error that is raised. If @filtered_ratings is nil, I want @filtered_ratings to be set to an empty array (or hash). Is there an easy way of doing this without too much code? Thanks!
Edit: