Sha256: 91020275c1c41809f095a813f02edd6974d8aa9361d2cc325dee12c760aab685
Contents?: true
Size: 630 Bytes
Versions: 12
Compression:
Stored size: 630 Bytes
Contents
module CurationConcerns::TitleHelper def construct_page_title(*elements) (elements.flatten.compact + [application_name]).join(' // ') end def curation_concern_page_title(curation_concern) if curation_concern.persisted? construct_page_title(curation_concern.to_s, "#{curation_concern.human_readable_type} [#{curation_concern.to_param}]") else construct_page_title("New #{curation_concern.human_readable_type}") end end def default_page_title text = controller_name.singularize.titleize text = "#{action_name.titleize} " + text if action_name construct_page_title(text) end end
Version data entries
12 entries across 12 versions & 1 rubygems