|
12345678910111213141516171819202122 |
- def short_date(s)
- return if s.nil?
- Date.parse(s).strftime("%e %b %Y").gsub(' ', ' ')
- end
-
- def cleanup(s)
- return if s.nil?
- s.sub!('Unknown', '')
- s.sub!('Not Available', '')
- s.sub!('Not Applicable', '')
- # s = "<span class=grant>#{s}</span>" if s.match(/approve/i)
- # s = "<span class=refuse>#{s}</span>" if s.match(/refuse/i)
- s
- end
-
- def slug(s)
- s.downcase.gsub(' ', '-')
- end
-
- def authority_url(authority_name)
- "/authorities/#{slug(authority_name)}/"
- end
|