I am building a mechanism for sortable columns in tables. Every table represents a list of data so I call the database table "lists". Everything except the ordering of the columnpositions works. I want to display the columnpositions ordered by the field "position" but nothing changes even if I remove the :order statement.
- list.rb :has_many :columns
- column.rb :has_one :columnposition, :order => "position ASC"
- columnposition.rb <- The positions are stored here as simple integers.
I can access list.column.columnposition.position with no problem so the relations themselves seem to work.
Why are the columnpositions not ordered by "position ASC"?
// Edit: I fetch the lists with @lists = List.find :all