Skip to content

Commit 84a3fc7

Browse files
committed
ack
1 parent e3581bf commit 84a3fc7

File tree

4 files changed

+6
-4
lines changed

4 files changed

+6
-4
lines changed

app/models/room.rb

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
11
class Room < ApplicationRecord
2-
has_many :room_messages, dependent: :destroy
2+
has_many :room_messages, dependent: :destroy,
3+
inverse_of: :room
34
end

app/models/room_message.rb

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
class RoomMessage < ApplicationRecord
2-
belongs_to :room
2+
belongs_to :room, inverse_of: :room_messages
3+
34
belongs_to :user
45

56
def as_json(options)

app/views/devise/registrations/new.html.erb

+1-1
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
</div>
2121

2222
<div class="form-actions">
23-
<%= f.button :submit, "Sign up", class: 'btn-success' %>
23+
<%= f.button :submit, "Sign up", class: 'btn btn-success' %>
2424
</div>
2525
<% end %>
2626

app/views/rooms/index.html.erb

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<div class="row">
2-
<div class="col-12 col-md-3 text-cebter">
2+
<div class="col-12 col-md-3">
33
<%= render partial: 'rooms' %>
44
</div>
55

0 commit comments

Comments
 (0)