KnowledgeHub
Questions
Tags
Users
Search
Alex Rivera
|
Logout
Edit Question
Title
Body
Let's say I have two models: Course and ScheduledCourse. The Course model has a name attribute. course has_many :scheduled courses scheduled_courses :belongs_to course courses id | name 1 | biology 2 | history 3 | chemistry 4 | literature scheduled_courses id | course_id 1 | 2 2 | 4 3 | 1 4 | 2 How can I make an ActiveRecord query to sort the scheduled courses alphabetically?
Tags (comma-separated)
Save Edits
Cancel