I would simplify the method to:
```ruby
def query_params
  @query_params ||= begin
    dict = Hash.new { |hash, key| raise 'not found' }.update true => true, false => false, 'true' => true, 'false' => false      
    params.inject({}) do |hash, (key, value)|
      next if %w(controller action).include? key
      hash.update key dict[value]
    end
  end
end
```
a concrete exception should be risen.