19 lines
420 B
Ruby
19 lines
420 B
Ruby
# == Schema Information
|
|
#
|
|
# Table name: notifications
|
|
#
|
|
# id :integer not null, primary key
|
|
# user_id :integer not null
|
|
# message :string
|
|
# read :boolean default(FALSE)
|
|
# created_at :datetime not null
|
|
# updated_at :datetime not null
|
|
#
|
|
|
|
class Notification < ActiveRecord::Base
|
|
belongs_to :user
|
|
|
|
def read!
|
|
update_attributes read: true
|
|
end
|
|
end
|