File tree 3 files changed +5
-2
lines changed
3 files changed +5
-2
lines changed Original file line number Diff line number Diff line change @@ -15,6 +15,7 @@ export default DS.Model.extend({
15
15
mailing_list : DS . attr ( 'string' ) ,
16
16
issues : DS . attr ( 'string' ) ,
17
17
documentation : DS . attr ( 'string' ) ,
18
+ originalDocumentation : DS . attr ( 'string' ) ,
18
19
repository : DS . attr ( 'string' ) ,
19
20
exact_match : DS . attr ( 'boolean' ) ,
20
21
Original file line number Diff line number Diff line change @@ -41,8 +41,7 @@ export default Route.extend({
41
41
} ;
42
42
43
43
const fetchCrateDocumentation = ( ) => {
44
- if ( ! crate . get ( 'documentation' ) ||
45
- crate . get ( 'documentation' ) . substr ( 0 , 16 ) === 'https://docs.rs/' ) {
44
+ if ( ! crate . get ( 'originalDocumentation' ) ) {
46
45
let crateName = crate . get ( 'name' ) ;
47
46
let crateVersion = params . version_num ;
48
47
this . get ( 'ajax' ) . request ( `https://docs.rs/crate/${ crateName } /${ crateVersion } /builds.json` )
Original file line number Diff line number Diff line change @@ -2,6 +2,9 @@ import DS from 'ember-data';
2
2
3
3
export default DS . RESTSerializer . extend ( {
4
4
isNewSerializerAPI : true ,
5
+ attrs : {
6
+ originalDocumentation : 'documentation'
7
+ } ,
5
8
6
9
extractRelationships ( modelClass , resourceHash ) {
7
10
if ( resourceHash . versions == null ) {
You can’t perform that action at this time.
0 commit comments