Module: Abongo::Controller::Dashboard

Defined in:
lib/abongo/controller/dashboard.rb

Instance Method Summary collapse

Instance Method Details

#end_experimentObject



16
17
18
19
20
21
# File 'lib/abongo/controller/dashboard.rb', line 16

def end_experiment
  @alternative = Abongo.get_alternative(params[:id])
  @experiment = Abongo.get_test(@alternative['test'])
  Abongo.end_experiment! @experiment['name'], @alternative['content']
  redirect_to :back
end

#indexObject



11
12
13
14
# File 'lib/abongo/controller/dashboard.rb', line 11

def index
  @experiments = Abongo.all_tests.map{|e| {'participants' => 0, 'conversions' => 0}.merge(e)}
  render :template => 'dashboard/index'
end