```ruby
require 'sinatra/base'
# Main sinatra App, using param routing.
class App < Sinatra::Base
  # GET Routing views
  get('/') { erb :index }
  error    { erb :error }

  get '/:view/:param' do |view, param| # Templates with double-routing
    case view
    when 'aire', 'agua', 'fuego', 'tierra' then preview('hechizos')
    else preview(view) # Try same view as URL (with params)
    end
  end

  get '/:view' do |view| # Templates with simple root-viewer
    case view
    when 'reservistas', 'ausentes', 'licenciados' then preview('heroes')
    else preview(view) # Try same view as URL
    end
  end

  # POST Routing views
  post('/calculador') { preview('calculador') }
  post('/buscar')     { preview('heroes') }
end
```

Delete case switches in routes, just add if-ternary
user
```ruby
require 'sinatra/base'
# Main sinatra App, using param routing.
class App < Sinatra::Base
  # GET Routing views
  get('/') { erb :index }
  error    { erb :error }

  get '/:view/:param' do |view, param| # Templates with double-routing
    hechizo = %w(aire agua fuego tierra).include?(view)
    hechizo ? preview('hechizos') : preview(view)
  end

  get '/:view' do |view| # Templates with simple root-viewer
    campeones = %w(reservistas ausentes licenciados).include?(view)
    campeones ? preview('heroes') : preview(view)
  end

  # POST Routing views
  post('/calculador') { preview('calculador') }
  post('/buscar')     { preview('heroes') }
end
```
assistant