DEV Community

disanchez27edu
disanchez27edu

Posted on

Methods, Symbols, and strings

What is the difference? How do I know when to call one vs the other? Ex case:

In reformatting:

matching_movies = Movie.all
@list_of_movies = matching_movies.order( created_at: desc )

to:

matching_movies = Movie.all.order( created_at: :desc )

what is the class of :desc? Why did we use it?

Top comments (0)