BenMusch/nu-tab

View on GitHub
app/models/room.rb

Summary

Maintainability
A
0 mins
Test Coverage
Missing magic comment `# frozen_string_literal: true`.
# == Schema Information
#
# Table name: rooms
#
# id :integer not null, primary key
# name :string
# rank :integer
# created_at :datetime not null
# updated_at :datetime not null
#
 
# frozen_string_literal: true
Add an empty line after magic comments.
class Room < ApplicationRecord
include CheckInnable
 
validates :rank, presence: true,
inclusion: 0...100
validates :name, presence: true,
uniqueness: true,
length: { in: 4...50 }
end