In this third part to a four-part article series on implementing tagging support for an ecommerce website using Ruby-on-Rails, you'll learn how to set up the application so users can assign tags to items. This article is excerpted from chapter seven of the book Practical Rails Projects, written by Eldon Alameda (Apress; ISBN: 1590597818).
Recall that we use theload_datamethod to load all authors, publishers, and tags in thenewandeditactions. Now, if you openhttp://localhost:3000/admin/book/new, you should see the new field.
Add a book and type in a few tags, such asProgramming, Rails, Ruby. Save the book, and create another book. Type the character R in the Tags field. This time, you should see a list of tags containing both Rails and Ruby.