- def index
- @page = Author.page params[:page]
- @page_size = Author.page_size params[:page_size]
- @authors = Author.list(@page, @page_size)
-
- respond_to do |format|
- format.html # index.html.erb
- format.json { render :json => @authors.to_json(Author.list_json_opt) }
- end
- end
-
- def show
- @au = Author.show(params[:id], [@user, @admin])
-
- respond_to do |format|
- format.html
- format.json { render :json => @au.to_json(Author.show_json_opt) }
- end
- end
-
- def comics
- @au = Author.show(params[:id], [@user, @admin])
-
- @page = Author.page params[:page]
- @page_size = Author.comic_page_size params[:page_size]
- @comics = Comic.himlist(@au, @page, @page_size)
-
- respond_to do |format|
- format.html # index.html.erb
- format.json { render json: @comics.to_json(Comic.list_json_opt) }
- end