Hi,

I've tried searching the group (which has helped me solve many
issues!), but I've not found a solution for this one...

I have a few tables with a one-to-one relationship that I'm having
this problem with, but I'll simplify it:

class Store < ActiveRecord::Base
        has_one :utm
end

class Utm < ActiveRecord::Base
        belongs_to :store
end

When I am on the Stores page, I can select a UTM record to associate
with a given store.  If I go to another store record, the dropdown
list I'm given doesn't include the UTM previously selected.  So far,
so good.

When I'm on the UTM page, I have it so that the store can be selected
from that side as well.  From this side, however, the store dropdown
list contains all stores, including those that already have a UTM
selected.  Shouldn't it be similarly filtered?

Is there any way to get the dropdown list of stores to include only
those stores that haven't had a UTM assigned to them yet?  If this is
an issue because the Store table doesn't have a link back to the
associated UTM record, what changes can I made to the database to add
this???

Thanks,
Paul

--~--~---------~--~----~------------~-------~--~----~
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