Sha256: be0280a4dac941c3ac9aa0ee3bd565c1a51b8bd2b166e0cdfc0349f025cc5b78

Contents?: true

Size: 1.01 KB

Versions: 3

Compression:

Stored size: 1.01 KB

Contents

module IWonder
  class AbTestsController < ApplicationController
    layout "i_wonder"
    
    if defined?(newrelic_ignore)
      newrelic_ignore
    end

    def index
      @ab_tests = AbTest.all
    end

    def show
      @ab_test = AbTest.find(params[:id])
    end

    def new
      @ab_test = AbTest.new(params[:ab_test])
    end

    def create
      @ab_test = AbTest.new(params[:ab_test])

      if @ab_test.save
        redirect_to @ab_test, :notice => "Successfully created ABTest"
      else
        render "new"
      end
    end

    def edit
      @ab_test = AbTest.find(params[:id])
      render "edit"
    end

    def update
      @ab_test = AbTest.find(params[:id])

      if @ab_test.update_attributes(params[:ab_test])
        redirect_to @ab_test, :notice => "Successfully updated ABTest"
      else
        render "edit"
      end
    end

    def destroy
      @ab_test = AbTest.find(params[:id])
      @ab_test.destroy
      redirect_to ab_tests_path, :notice => "ABTest has been destroyed"
    end
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
i_wonder-0.1.5 app/controllers/i_wonder/ab_tests_controller.rb
i_wonder-0.1.3 app/controllers/i_wonder/ab_tests_controller.rb
i_wonder-0.1.2 app/controllers/i_wonder/ab_tests_controller.rb