Skip to content

page title set incorrectly when there is no story title #3

@dyoder

Description

@dyoder

this code originally was supposed to default to a title-cased version of the name if there was no title, ex: my-summer-vacation automatically turns into "My Summer Vacation". I think this logic was supposed to go into a model method called label or something like that.

# used whenever we want to display a human readable
# name for this object ... 
def label
  @title or @name.text.titlecase
end

All objects probably need a method like this. Then the code to set the title for a given page should simply use the label method:

title @story.label

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions