small medium large xlarge

17 Apr 2011, 05:57
Zhao Han (4 posts)

It seems there are so many magics out Rails…

what is line_items? (i.e. what does line_items return?)

(So that I can read Rails’s api for more detail)


03 May 2011, 20:31
David Nehme (2 posts)

line_items is specific to the depot application. It is not built into rails. It is an accessor method that was created by rails. Rails created the accessor because the Cart class contains the annotation ` has_many :line_items `

line_items returns a list of LineItem

28 Apr 2011, 04:23
Zhao Han (4 posts)

Thank you David!

It would be ideal that the book has talked about something like your reply…

You must be logged in to comment