Im creating a library management system as part of a college assignment.
Im currently stuck on obtaining the result of pluck.
The task Im trying to do here is to display a list of books that are currently in the table.
Ive been primarily a PHP programmer so ruby on rails is a whole new world for me.
From doing external research I found out about object.pluck.
You can assign the whole books collection to a variable, and then use it in view:
# in controller's action (most likely index) @books = Book.all # in index.html.* view (haml example): - @books.each do |book| = link_to 'Edit book', edit_book_path(book)
Make sure you go through the docs (really useful).