Hi,

Has anyone managed to get has many through relationships to update and
save?  I can get them to display on the forms but they never update or
save.  My models\controllers are below.  So basically if i try to edit
\create a product i get a check box list of the different operating
systems Mac, PC, Linux etc that i can tick but they never save.  Ive
tried some changes like changing operating_systems to
product_operating_systems but it didnt work.  I know it will work with
HABTM but i dont want to go down this route as its all setup to work
with has many through.

class Product < ActiveRecord::Base
  has_many :product_operating_systems
  has_many :operating_systems, :through => :product_operating_systems
end

class OperatingSystem < ActiveRecord::Base
  has_many :product_operating_systems
  has_many :products, :through => :product_operating_systems
end

class ProductOperatingSystem < ActiveRecord::Base
  belongs_to :product
  belongs_to :operating_system
end

class Admin::ProductsController < ApplicationController
  active_scaffold :product do |config|
    config.columns = [:operating_systems]
   columns[:operating_systems].form_ui = :select
  end
end

If anyone can help it would be appreciated as i have quite a few has
many through to use with AS.

Im on rails 2.3.3 and the latest version of AS,

JB
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"ActiveScaffold : Ruby on Rails plugin" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/activescaffold?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to