I have a application where I have a book model.
I have a book controller, it has an action named “index_titles”
What should I write in the action of this controller to get a list
with the distinct first letters for each book model in the view ?
For example when I have five books:
“Bookworm is comming”
“Basic for beginners”
“Denial of service”
“UPS development guide”
I will have four links in the view with the anchors “A”, “B”, “D” and
I’m a experienced PHP developer, but I’m a newcommer to Ruby. What is
the optimal rails way to accomplish this ?