Module: Precious::Editable
- Included in:
- Views::Create, Views::Edit
- Defined in:
- lib/gollum/frontend/views/editable.rb
Instance Method Summary collapse
Instance Method Details
#formats(selected = @page.format) ⇒ Object
3 4 5 6 7 8 9 10 11 |
# File 'lib/gollum/frontend/views/editable.rb', line 3 def formats(selected = @page.format) Gollum::Page::FORMAT_NAMES.map do |key, val| { :name => val, :id => key.to_s, :selected => selected == key} end.sort do |a, b| a[:name].downcase <=> b[:name].downcase end end |