Made the filter work only for the specified actions

If there are 2 actions index and show,

and this exists

```ruby
restrict_request_type of: [:show], to: [:json]
```

Then the filter will run for both actions and return 406 when we don't expect it