package com.agiledeveloper

class SearchBookController {

  def books() {
    def title = ''
    def booksList = []
    
    if(params.title) {
      title = params.title
      
      booksList = Book.findAllByTitleLike("%$title%")
    }
    
    [title: title, booksList: booksList]
  }
}
