Class: ReserveStatHasUsersController

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

Instance Method Summary collapse

Instance Method Details

#createObject

POST /reserve_stat_has_users POST /reserve_stat_has_users.json



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

def create
  @reserve_stat_has_user = ReserveStatHasUser.new(params[:reserve_stat_has_user])

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

#destroyObject

DELETE /reserve_stat_has_users/1 DELETE /reserve_stat_has_users/1.json



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

def destroy
  @reserve_stat_has_user.destroy

  respond_to do |format|
    format.html { redirect_to(reserve_stat_has_users_url) }
    format.json { head :no_content }
  end
end

#editObject

GET /reserve_stat_has_users/1/edit



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

def edit
end

#indexObject

GET /reserve_stat_has_users GET /reserve_stat_has_users.json



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

def index
  @reserve_stat_has_users = ReserveStatHasUser.page(params[:page])

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

#newObject

GET /reserve_stat_has_users/new GET /reserve_stat_has_users/new.json



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

def new
  @reserve_stat_has_user = ReserveStatHasUser.new

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

#showObject

GET /reserve_stat_has_users/1 GET /reserve_stat_has_users/1.json



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

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

#updateObject

PUT /reserve_stat_has_users/1 PUT /reserve_stat_has_users/1.json



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

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