nested resources params fix

Hi, many thanks for the plugin! I had some problems getting it to work with nested resources params,
this is is the simple fix I came up with.