Skip to content

Commit c423ac1

Browse files
committed
app: Migrate versions.length to num_versions
1 parent e05ea4f commit c423ac1

File tree

3 files changed

+3
-2
lines changed

3 files changed

+3
-2
lines changed

app/components/crate-header.hbs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@
5454
</nav.Tab>
5555

5656
<nav.Tab @link={{link "crate.versions" @crate}} data-test-versions-tab>
57-
{{pluralize @crate.versions.length "Version"}}
57+
{{pluralize @crate.num_versions "Version"}}
5858
</nav.Tab>
5959

6060
<nav.Tab

app/models/crate.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ export default class Crate extends Model {
1818
* @type {string | null}
1919
*/
2020
@attr default_version;
21+
@attr num_versions;
2122
@attr yanked;
2223
@attr max_version;
2324
@attr max_stable_version;

app/templates/crate/versions.hbs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
<div local-class="results-meta">
44
<span local-class="page-description" data-test-page-description>
5-
All <strong>{{ this.model.versions.length }}</strong>
5+
All <strong>{{ this.model.num_versions }}</strong>
66
versions of <strong>{{ this.model.name }}</strong> since
77
{{date-format this.model.created_at 'PPP'}}
88
</span>

0 commit comments

Comments
 (0)