bouquins-ror/app/controllers/authors_controller.rb

18 lines
278 B
Ruby
Raw Normal View History

2015-06-28 15:14:47 +00:00
class AuthorsController < ApplicationController
def show
@author = Author.find(params[:id])
@title = @author.name
end
def index
@authors = Author.paginate(page: params[:page])
@title = "Authors"
2015-06-29 16:58:02 +00:00
respond_to do |format|
format.html
format.js
end
2015-06-28 15:14:47 +00:00
end
end