Since `@data` here will always be an array with just one element, it might make more sense to add a `.first` to the assignment in your controller. Then your view wouldn't need this `each` loop that only ever loops once.

`@data` is also a rather generic variable name. The Rails convention is to use the plural form of the object in question when it's a collection, and the singular when it's a single object. So it would be `@stock` here, and `@stocks` in the index.