Hi All!
I thought I saw the solution to this problem a long time ago, but I
can't seem to find it now.
I have a table of Properties with belongs_to Agents. I want to restrict
the uniqueness of the property's name only to a specific Agent such that
Agent1 had Properties A, B and C and Agent2 adds a property B - right
now that is rejected as being a duplicate, but it shouldn't fail. I can
do this with a bit of hacking, but there should be an easy way to do it.
in the Agents model:
fields do
name :string, :unique, :required
*
*
end
has_many :properties
in the Properties model:
fields do
name :string, :unique, :required *#I should be able to add
something here I think.*
*
*
end
belongs to :agent
What am I missing here?
Thanks,
Don Z.
--
You received this message because you are subscribed to the Google Groups "Hobo
Users" 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/hobousers?hl=en.