Class: OutroRails::Instruments::PickersController

Inherits:
ApplicationController show all
Includes:
GuitarTuningSelectable, OutroRails::InstrumentSelectable
Defined in:
app/controllers/outro_rails/instruments/pickers_controller.rb

Constant Summary

Constants included from OutroRails::InstrumentSelectable

OutroRails::InstrumentSelectable::INSTRUMENTS

Instance Method Summary collapse

Instance Method Details

#showObject



9
10
11
12
13
14
15
16
17
18
# File 'app/controllers/outro_rails/instruments/pickers_controller.rb', line 9

def show
  instrument = instrument_or_default(params[:instrument])
  tuning = guitar_tuning_or_default(instrument)

  if instrument == "guitar" && !tuning.standard?
    redirect_to guitar_tuning_instrument_path(tuning.slug)
  else
    redirect_to instrument_path(instrument)
  end
end