Skip to content

Instantly share code, notes, and snippets.

@flyerhzm
Created May 2, 2020 09:00
Show Gist options
  • Save flyerhzm/80587b7026f2748dabbf2c47ac3b2cb0 to your computer and use it in GitHub Desktop.
Save flyerhzm/80587b7026f2748dabbf2c47ac3b2cb0 to your computer and use it in GitHub Desktop.
def title
- Utils.slugify(@obj.data["slug"], :mode => "pretty", :cased => true) ||
- Utils.slugify(@obj.basename_without_ext, :mode => "pretty", :cased => true)
+ Utils.slugify(@obj.data["slug"], :mode => "pretty", :cased => true) || Utils.slugify(@obj.basename_without_ext, :mode => "pretty", :cased => true)
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment