Class: Thredded::PrivateTopic
- Inherits:
-
ActiveRecord::Base
- Object
- ActiveRecord::Base
- Thredded::PrivateTopic
show all
- Extended by:
- FriendlyId
- Includes:
- TopicCommon
- Defined in:
- app/models/thredded/private_topic.rb
Class Method Summary
collapse
Instance Method Summary
collapse
#last_user, #private?, #user
Class Method Details
.find_by_slug(slug) ⇒ Object
51
52
53
54
55
|
# File 'app/models/thredded/private_topic.rb', line 51
def self.find_by_slug(slug)
friendly.find(slug)
rescue ActiveRecord::RecordNotFound
raise Thredded::Errors::PrivateTopicNotFound
end
|
Instance Method Details
#public? ⇒ Boolean
57
58
59
|
# File 'app/models/thredded/private_topic.rb', line 57
def public?
false
end
|
#should_generate_new_friendly_id? ⇒ Boolean
61
62
63
|
# File 'app/models/thredded/private_topic.rb', line 61
def should_generate_new_friendly_id?
title_changed?
end
|