Class: Faq
- Inherits:
-
Object
show all
- Defined in:
- app/models/faq.rb
Defined Under Namespace
Classes: QAPair, Section, Subtitle
Class Method Summary
collapse
Class Method Details
.data ⇒ Object
49
|
# File 'app/models/faq.rb', line 49
def data; data = YAML.load_file 'db/faq.yml' end
|
.markdown(str) ⇒ Object
50
51
52
|
# File 'app/models/faq.rb', line 50
def markdown str
RDiscount.new(str).to_html.html_safe
end
|
.sections ⇒ Object
53
54
55
|
# File 'app/models/faq.rb', line 53
def sections
data.map {|k,v| Faq::Section.new name: k, item: v }
end
|