← Back to Upcase

Rails Fundamentals - Interpolate Data in a View

(Upcase ) #1

This topic is for the [Interpolate Data in a View][] exercise in the [Rails Fundamentals][] trail. Post any questions, corrections, or pointers you have to share with other Upcase subscribers.
[Interpolate Data in a View]: https://exercises.upcase.com/exercises/interpolate-data-in-a-view]
[Rails Fundamentals]: https://thoughtbot.com/upcase/rails-fundamentals

(Flo Maldonado) #2

Are we supposed to use the all method? As in GuesbookEntry.all ? I think it’s deprecated. I ended up using GuestbookEntry.order(‘created_at DESC’), but that’s an ordered result right? And we’re supposed to display an unordered list. Is there a method we are supposed to use that is not deprecated in Rails 4 and unordered?

(Andy Waite) #3

Why do you think all is deprecated?

http://api.rubyonrails.org/classes/ActiveRecord/Scoping/Named/ClassMethods.html#method-i-all

(Dion P) #4

The unordered list part simply refers to the welcome.html.erb’s <ul></ul>

(Flo Maldonado) #5

Sorry I missed your reply till now. You’re right ‘.all’ does work in Rails 4. I can’t get my error message any more, but I remember it was very similar to this stack overflow question. http://stackoverflow.com/questions/18203712/rails-4-relationall-deprecation
Anyhow, thanks for replying, sorry I can’t make the error show up again.