I am new to Rails.
I Have create a simple rails page which accepts bookid, title and publisher
rails generate scaffold book bookid:string title:string publisher:string
I have written a new search.html.erb and a defination to it which search for books by title.
Now my Question is how do i give a custom message if that book details doesn't exist in database.
Ex : I gave book name as rails it doesn't have any entry in my database
it should give message No Such Books
Aucun commentaire:
Enregistrer un commentaire