Class: Gera::DirectionRatesController

Inherits:
ApplicationController show all
Defined in:
app/controllers/gera/direction_rates_controller.rb

Instance Method Summary collapse

Instance Method Details

#lastObject

TODO: use params from show



9
10
11
12
13
14
# File 'app/controllers/gera/direction_rates_controller.rb', line 9

def last
  exchange_rate = direction_rate.exchange_rate
  dr = Universe.direction_rates_repository.find_direction_rate_by_exchange_rate_id exchange_rate.id

  redirect_to direction_rate_path(dr), flash: { success: "Перекинули на страницу курса от #{I18n.l dr.created_at, format: :long}" }
end

#showObject



16
17
18
19
20
# File 'app/controllers/gera/direction_rates_controller.rb', line 16

def show
  render locals: {
    direction_rate: direction_rate
  }
end