class Panel::PersonalBook::FrontEnd::WritingBooksController < OrbitWidgetController def initialize super @app_title = 'personal_book' end def index @writing_books = WritingBook.where(:is_hidden => false).desc(:year,:publish_date).page(params[:page]).per(10) end # GET /writing_books/1 # GET /writing_books/1.xml def show @writing_book = WritingBook.find(params[:id]) @book_author_types = ( !@writing_book.book_author_types.blank? ? @writing_book.book_author_types.collect{|x| x.title}.join(', ') : nil) end end