app/models/toc_item.rb
# TODO - sure, we can code this with english labels, but it should STORE ids.
sure, we can code this with english labels, but it should STORE ids.
sure we can code this with english labels but it should STORE ids .
def selectable_toc
      InfoItem
      cached("selectable_toc/#{I18n.locale}") {
        TocItem.find(:all, include: :info_items).select {|toc|
          toc.allow_user_text?
        }.sort_by { |toc| toc.label.to_s }
      }
    end
def selectable_toc InfoItem cached ( "selectable_toc/#{I18n.locale}" ) { TocItem . find ( :all , include : :info_items ) . select { | toc | toc . allow_user_text? } . sort_by { | toc | toc . label . to_s } } end
TODO - sure, we can code this with english labels, but it should STORE ids.
TODO - sure we can code this with english labels but it should STORE ids .