blob: cb0c70ffc3dd2564e18b4b54d9a766f4805c86f9 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
|
class Switchboard < ActiveRecord::Base
# https://github.com/rails/strong_parameters
include ActiveModel::ForbiddenAttributesProtection
validates :name,
:presence => true,
:uniqueness => {:scope => :user_id}
belongs_to :user, :touch => true
def to_s
self.name.to_s
end
end
|