Skip to content

Use fake slugs #11

@jacksonrayhamilton

Description

@jacksonrayhamilton

Use urls like /projects/15/activitybot-challenge and use the first argument as the lookup id for a model.

Also, if a user visits /projects/15, he should be 301-redirected to /projects/15/activitybot-challenge.

Also:

// Urls dynamically-generated by Cake, like with this code...
$this->Html->link(
  h($post['Post']['title']),
  array('action' => 'view', $post['Post']['id'])
)
<!-- ...should output this: -->
<a href="/projects/15/activitybot-challenge">ActivityBot Challenge</a>

Also, slugs do not necessarily need to be unique anymore. We may remove their unique constraints from their Model files and their MySQL rows.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions