Class: IWonder::AbTestsController
- Inherits:
-
ApplicationController
- Object
- ApplicationController
- IWonder::AbTestsController
- Defined in:
- app/controllers/i_wonder/ab_tests_controller.rb
Instance Method Summary collapse
- #create ⇒ Object
- #destroy ⇒ Object
- #edit ⇒ Object
- #index ⇒ Object
- #new ⇒ Object
- #show ⇒ Object
- #update ⇒ Object
Instance Method Details
#create ⇒ Object
21 22 23 24 25 26 27 28 29 |
# File 'app/controllers/i_wonder/ab_tests_controller.rb', line 21 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 |
#destroy ⇒ Object
46 47 48 49 50 |
# File 'app/controllers/i_wonder/ab_tests_controller.rb', line 46 def destroy @ab_test = AbTest.find(params[:id]) @ab_test.destroy redirect_to ab_tests_path, :notice => "ABTest has been destroyed" end |
#edit ⇒ Object
31 32 33 34 |
# File 'app/controllers/i_wonder/ab_tests_controller.rb', line 31 def edit @ab_test = AbTest.find(params[:id]) render "edit" end |
#index ⇒ Object
9 10 11 |
# File 'app/controllers/i_wonder/ab_tests_controller.rb', line 9 def index @ab_tests = AbTest.all end |
#new ⇒ Object
17 18 19 |
# File 'app/controllers/i_wonder/ab_tests_controller.rb', line 17 def new @ab_test = AbTest.new(params[:ab_test]) end |
#show ⇒ Object
13 14 15 |
# File 'app/controllers/i_wonder/ab_tests_controller.rb', line 13 def show @ab_test = AbTest.find(params[:id]) end |
#update ⇒ Object
36 37 38 39 40 41 42 43 44 |
# File 'app/controllers/i_wonder/ab_tests_controller.rb', line 36 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 |