Has anyone got a solution to this or some type of a workaround?
Surely someone has tackled it!
Ive tried various things but when i think ive cracked it then deleting
items or editing items... throws up a stumbling block

Ive read some interesting articles and was wondering if using nestable
form associations
in the new version of rails may be a solution for this and for general
associations.

Ive too many has_many :through relationships to change to HABTM and
hit a brick wall with this now.

Any help is appreciated,

JB



accepts_nested_attributes_for

On 23 Apr, 09:03, johnnybutler7 <[email protected]> wrote:
> Hi,
>
> Hasanyone managed to gethasmanythroughrelationships 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
> withhasmanythrough.
>
> 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 
> fewhasmanythroughto 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