Class: DatashiftJourney::JourneyEndsController

Inherits:
ApplicationController show all
Defined in:
app/controllers/datashift_journey/journey_ends_controller.rb

Instance Method Summary collapse

Instance Method Details

#showObject



7
8
9
10
11
12
13
14
15
16
# File 'app/controllers/datashift_journey/journey_ends_controller.rb', line 7

def show
  journey_plan_class = params[:journey_plan_class] ? params[:journey_plan_class].constantize : DatashiftJourney.journey_plan_class

  token = params[:id] || params[:journey_plan_id]

  @journey_plan = token ? journey_plan_class.find(token) : journey_plan_class.new

  @journey_plan.on_journey_end if @journey_plan.respond_to? :on_journey_end

end