I have the following method:
def add_books(year, industry, author_id=nil) Books.where(publication_year:year, author: author_id) end
How can I update the query to not filter by author_id if it is not passed?
author_id
Aucun commentaire:
Enregistrer un commentaire