Module: Protozoa::Editable
- Included in:
- Views::Create, Views::Edit
- Defined in:
- lib/amiba/frontend/views/editable.rb
Instance Method Summary collapse
Instance Method Details
#categories ⇒ Object
12 13 14 15 16 17 18 19 |
# File 'lib/amiba/frontend/views/editable.rb', line 12 def categories Dir.glob("entries/*").map do |ef| _, category = ef.split("/") {id: category, name: category.singularize.titleize } end.sort do |a, b| a[:name].downcase <=> b[:name].downcase end end |