Class: ModWarning
Instance Method Summary
collapse
#attributes_print, fuzzy_search, match_search, #match_search, sanitize_for_search, sanitize_name, sanitize_sql_in, useful_err_msg, with_lax_group_rules
Instance Method Details
#body_as_html ⇒ Object
12
13
14
|
# File 'app/models/mod_warning.rb', line 12
def body_as_html
ApplicationController.helpers.render_markdown(body)
end
|
#suspension_active? ⇒ Boolean
8
9
10
|
# File 'app/models/mod_warning.rb', line 8
def suspension_active?
active && is_suspension && !suspension_end.past?
end
|
#suspension_duration ⇒ Object
These two are necessary for the new warning form to work.
17
18
19
|
# File 'app/models/mod_warning.rb', line 17
def suspension_duration
1
end
|
#suspension_public_notice ⇒ Object
21
22
23
|
# File 'app/models/mod_warning.rb', line 21
def suspension_public_notice
nil
end
|