I'm interested in getting the nested 'name' parameter of a params hash. Calling something like
params[:subject][:name]
throws an error when params[:subject] is empty. To avoid this error I usually write something like this:
if params[:subject] && params[:subject][:name]
Is there a cleaner way to implement this?