This repository has been archived on 2020-05-27. You can view files and clone it, but cannot push or open issues/pull-requests.
barleysodas/lib/wordy_parameter.rb

11 lines
171 B
Ruby

module WordyParameter
def to_param
if self.respond_to?("page")
title = page.title
else
title = self.title
end
title.gsub(/ /, '_')
end
end