diff --git a/app/controllers/authors_controller.rb b/app/controllers/authors_controller.rb index 166a326..82ed596 100644 --- a/app/controllers/authors_controller.rb +++ b/app/controllers/authors_controller.rb @@ -36,7 +36,7 @@ class AuthorsController < ApplicationController end def series - @author = Author.find(params[:id]) + @series = Serie.find_by_sql(["select distinct s.* from series s left outer join books_series_link bsl on bsl.series = s.id left outer join books_authors_link bal on bal.book = bsl.book where bal.author = ?", params[:id]]) respond_to do |format| format.html format.js diff --git a/app/views/authors/_series.html.erb b/app/views/authors/_series.html.erb index 1333ed7..4327e63 100644 --- a/app/views/authors/_series.html.erb +++ b/app/views/authors/_series.html.erb @@ -1 +1,6 @@ -TODO +