Class: CheckoutStatHasUsersController

Inherits:
ApplicationController
  • Object
show all
Defined in:
app/controllers/checkout_stat_has_users_controller.rb

Instance Method Summary collapse

Instance Method Details

#createObject

POST /checkout_stat_has_users POST /checkout_stat_has_users.json



41
42
43
44
45
46
47
48
49
50
51
52
53
54
# File 'app/controllers/checkout_stat_has_users_controller.rb', line 41

def create
  @checkout_stat_has_user = CheckoutStatHasUser.new(params[:checkout_stat_has_user])

  respond_to do |format|
    if @checkout_stat_has_user.save
      flash[:notice] = t('controller.successfully_created', :model => t('activerecord.models.checkout_stat_has_user'))
      format.html { redirect_to @checkout_stat_has_user }
      format.json { render :json => @checkout_stat_has_user, :status => :created, :location => @checkout_stat_has_user }
    else
      format.html { render :action => "new" }
      format.json { render :json => @checkout_stat_has_user.errors, :status => :unprocessable_entity }
    end
  end
end

#destroyObject

DELETE /checkout_stat_has_users/1 DELETE /checkout_stat_has_users/1.json



73
74
75
76
77
78
79
80
# File 'app/controllers/checkout_stat_has_users_controller.rb', line 73

def destroy
  @checkout_stat_has_user.destroy

  respond_to do |format|
    format.html { redirect_to checkout_stat_has_users_url }
    format.json { head :no_content }
  end
end

#editObject

GET /checkout_stat_has_users/1/edit



36
37
# File 'app/controllers/checkout_stat_has_users_controller.rb', line 36

def edit
end

#indexObject

GET /checkout_stat_has_users GET /checkout_stat_has_users.json



6
7
8
9
10
11
12
13
# File 'app/controllers/checkout_stat_has_users_controller.rb', line 6

def index
  @checkout_stat_has_users = CheckoutStatHasUser.page(params[:page])

  respond_to do |format|
    format.html # index.html.erb
    format.json { render :json => @checkout_stat_has_users }
  end
end

#newObject

GET /checkout_stat_has_users/new GET /checkout_stat_has_users/new.json



26
27
28
29
30
31
32
33
# File 'app/controllers/checkout_stat_has_users_controller.rb', line 26

def new
  @checkout_stat_has_user = CheckoutStatHasUser.new

  respond_to do |format|
    format.html # new.html.erb
    format.json { render :json => @checkout_stat_has_user }
  end
end

#showObject

GET /checkout_stat_has_users/1 GET /checkout_stat_has_users/1.json



17
18
19
20
21
22
# File 'app/controllers/checkout_stat_has_users_controller.rb', line 17

def show
  respond_to do |format|
    format.html # show.html.erb
    format.json { render :json => @checkout_stat_has_user }
  end
end

#updateObject

PUT /checkout_stat_has_users/1 PUT /checkout_stat_has_users/1.json



58
59
60
61
62
63
64
65
66
67
68
69
# File 'app/controllers/checkout_stat_has_users_controller.rb', line 58

def update
  respond_to do |format|
    if @checkout_stat_has_user.update_attributes(params[:checkout_stat_has_user])
      flash[:notice] = t('controller.successfully_updated', :model => t('activerecord.models.checkout_stat_has_user'))
      format.html { redirect_to @checkout_stat_has_user }
      format.json { head :no_content }
    else
      format.html { render :action => "edit" }
      format.json { render :json => @checkout_stat_has_user.errors, :status => :unprocessable_entity }
    end
  end
end