diff options
Diffstat (limited to 'app/helpers/application_helper.rb')
| -rw-r--r-- | app/helpers/application_helper.rb | 10 | 
1 files changed, 9 insertions, 1 deletions
| diff --git a/app/helpers/application_helper.rb b/app/helpers/application_helper.rb index d2cdaaa20..124604cd9 100644 --- a/app/helpers/application_helper.rb +++ b/app/helpers/application_helper.rb @@ -3,12 +3,20 @@ module ApplicationHelper    include NewapplicationHelper +  def array_to_html_list items +    content_tag :ul do +      items.each do |item| +        concat content_tag :li, item +      end +    end +  end +    def page_header_title(object)      # Unwrap from decorator, we want to know the object model name      object = object.object if object.try(:object)      local  = "#{object.model_name.name.underscore.pluralize}.#{params[:action]}.title"      if object.try(:name) -      t(local, name: object.name) +      t(local, name: object.name || object.id)      else        t(local)      end | 
