Closed lmdragun closed 9 years ago
Do you get an error?
you could always make a custom method in your model definitions as well. IE in your comic.rb
:
def order_series_by_alpha
# some code that gets all of the series and orders them
end
Then you could just do @ordered_comis = @ownd_comics.comics.order_series_by_alpha
... or something like that.
Cool, i think we solved this issue, open another issue if you run into more problems with this issue or reopen
I have a users table, an ownerships join table, and a comics table, so that users have comics through ownerships. On the user's show page, I can output the comics by getting the join table information ('c.comics.series' for example), but I want to order them alphabetically by series (which is in the comics table).
This is what I have right now, but it's not working (the first two lines work):
I also tries ("series DESC") and a few other ways.