• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

osulp / Room-Reservation / 827

pending completion
827

push

travis-ci

web-flow
Merge pull request #298 from osulp/admin-reservation-bugfix

fixes bug related to rooms that have been deleted

1566 of 2086 relevant lines covered (75.07%)

129.37 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

46.15
/app/controllers/admin/rooms_controller.rb
1
class Admin::RoomsController < AdminController
1✔
2
  respond_to :html, :json
1✔
3

4
  def index
1✔
5
    @rooms = Room.order(:floor, :name)
1✔
6
    respond_with @rooms
1✔
7
  end
8

9
  def new
1✔
10
    @room = Room.new
×
11
    respond_with @room
×
12
  end
13

14
  def edit
1✔
15
    @room = Room.find(params[:id])
×
16
    respond_with @room
×
17
  end
18

19
  def create
1✔
20
    @room = Room.new(room_params)
×
21
    flash[:success] = 'Room added' if @room.save
×
22
    respond_with @room, :location => admin_rooms_path
×
23
  end
24

25
  def update
1✔
26
    @room = Room.find(params[:id])
×
27
    flash[:success] = 'Room updated' if @room.update(room_params)
×
28
    respond_with @room, :location => admin_rooms_path
×
29
  end
30

31
  def destroy
1✔
32
    @room = Room.find(params[:id])
×
33
    flash[:success] = 'Room deleted' if @room.destroy
×
34
    respond_with(@room, :location => admin_rooms_path)
×
35
  end
36

37
  private
1✔
38

39
  def room_params
1✔
40
    params.require(:room).permit(:name, :floor, :description, :image, :floor_map, :remove_image, :remove_floor_map, {:filter_ids => []})
×
41
  end
42
end
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2025 Coveralls, Inc