Given this relationship:
class Doc < ActiveRecord::Base
has_and_belongs_to_many :articles
end
and
class Article < ActiveRecord::Base
has_and_belongs_to_many :docs
end
How would you approach sorting the articles
in the Doc with jQuery UI? I was following this tutorial, which was all well and good until it came time to run this migration:
rails g migration add_position_to_faqs position:integer
because it seems like doubling-up when I already have a relationship table, thus:
create_table "articles_docs", :id => false, :force => true do |t|
t.integer "article_id"
t.integer "doc_id"
end
add_index "articles_docs", ["article_id", "doc_id"], :name => "index_articles_docs_on_article_id_and_doc_id", :unique => true
Any thoughts at all? Not really understanding the relationship table isn't helping me figure this out.