This design issue needs a little context, so please bear with me.
I currently have three models that go something like this:
class MyItem < ActiveRecordBase
has_many :my_list_items
...
class MyList < ActiveRecordBase
has_many :my_list_items
has_many :my_items, :through => :my_list_items
...
class MyListItem < ActiveRecordBase
belongs_to :my_item
belongs_to :my_list
has_many :my_list_item_properties
class MyListItemProperty < ActiveRecordBase
belongs_to :my_list_item
As you can see, a model is MyListItemmore than a simple join table; it also has other properties.
. MyItems , MyList , CRUD. MyList, MyListItems MyItem . MyItem ( MyListItem) MyItem MyListItem. RJS.
:
, , MyItem MyItemController, MyListController, . DRY, / partials/RJS .
AJAX MyList submit to MyItemController, , RJS MyList, . , : controller = > my_list link_to_remote MyList . , -, RESTful MyItem , .
?