activescaffold/active_scaffold — pull request #278 by chrisbarber (2013-05-30 23:22:22+00:00)
Title: properly handle subforms for readonly HABTM associations

tested & it seems like a pretty safe change. the scenario is roughly like:

```
class Model1 < ActiveRecord::Base
has_and_belongs_to_many :model2s, :readonly => true
...
end

class Model2 < ActiveRecord::Base
has_and_belongs_to_many :model1s
...
end

class Model1sController < ApplicationController
active_scaffold :model1 do |config|
config.columns = [..., :model2s]
end
...
end
```
and without this patch the subform for editing Model1 will show a blank record and also let you modify Model2 records as you associate them.

thanks!

-Chris
chrisba@alleninstitute.org