fix book_type nil

This commit is contained in:
JiangRu 2015-02-13 15:43:46 +08:00
parent 7874c30149
commit cbc46d3031
1 changed files with 1 additions and 1 deletions

View File

@ -6,7 +6,7 @@ class PersonalBooksController < ApplicationController
"book_title" => book.create_link, "book_title" => book.create_link,
"author" => book.authors, "author" => book.authors,
"year" => book.year, "year" => book.year,
"book_paper_type" => book.book_type.title, "book_paper_type" => (book.book_type.title rescue nil),
"link_to_show" => OrbitHelper.url_to_show(book.to_param) "link_to_show" => OrbitHelper.url_to_show(book.to_param)
} }
end end