diff options
| author | cedricnjanga | 2017-12-13 21:08:19 +0100 |
|---|---|---|
| committer | cedricnjanga | 2017-12-13 21:08:19 +0100 |
| commit | f5681428184d2cdc1dc49b4426da60101c107f35 (patch) | |
| tree | a42bf08d67f666138fffad366f21c13931eec672 /app/helpers/application_helper.rb | |
| parent | 7a78e65f6b765cced904c6214c3f48a16ca36261 (diff) | |
| parent | 3b291a73e977737cb8f6da7fce7f914504426b93 (diff) | |
| download | chouette-core-f5681428184d2cdc1dc49b4426da60101c107f35.tar.bz2 | |
Merge branch 'master' into staging
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 |
