Class: TrailGuide::Admin::OrphansController

Inherits:
ApplicationController show all
Defined in:
app/controllers/trail_guide/admin/orphans_controller.rb

Instance Method Summary collapse

Methods inherited from ApplicationController

#experiment_color, #experiment_icon, #experiment_metric, #experiment_metrics_visible?, #experiment_peekable?, #experiment_peeking?, #format_time, #peek_param, #peek_url, #preview_url, #subtitle, #trailguide_user

Instance Method Details

#adoptObject



17
18
19
20
21
22
23
24
25
# File 'app/controllers/trail_guide/admin/orphans_controller.rb', line 17

def adopt
  TrailGuide.catalog.adopted(@orphan.to_sym)
  flash[:success] = "Cleared references to <code>#{@orphan}</code>! It will reappear if it is encountered by users again."
  if TrailGuide.catalog.orphans.count > 0
    redirect_to trail_guide_admin.orphans_path
  else
    redirect_to trail_guide_admin.experiments_path
  end
end

#indexObject



11
12
# File 'app/controllers/trail_guide/admin/orphans_controller.rb', line 11

def index
end

#showObject



14
15
# File 'app/controllers/trail_guide/admin/orphans_controller.rb', line 14

def show
end