class ApplicationDecorator < Draper::Decorator
  delegate_all

  def self.collection_decorator_class
    PaginatingDecorator
  end

  def form_title
    "#{h.action_name.humanize} #{h.controller_name.singularize.humanize}"
  end

  def help_text
    new_record? ? new_help_text : edit_help_text
  end

  def number_format(format, number)
    h.send("number_#{format}", number, precision: 2)
  end
end
