MorningPeak/app/models/admin.rb
Arthur Poulet a769142d2f update tickets
following #13

- tickets have no more master
- tickets are commentables
2016-01-31 02:22:11 +01:00

19 lines
450 B
Ruby

class Admin < ActiveRecord::Base
# Include default devise modules. Others available are:
# :confirmable, :lockable, :timeoutable and :omniauthable
devise :database_authenticatable,
#:registerable,
#:recoverable,
:rememberable#,
#:trackable,
#:validatable
has_many :tickets, as: :creator
has_many :comments, as: :creator
def tickets_unview
Ticket.all.where(admin_view_at: nil)
end
end