Implement has_many

This commit is contained in:
Santiago Pastorino
2013-08-16 23:14:59 -03:00
parent fa61314d0e
commit 61a1669a86
4 changed files with 113 additions and 3 deletions

View File

@@ -47,6 +47,16 @@ module ActiveModel
name
end
end
class HasMany < Association
def key
"#{name.singularize}_ids"
end
def embedded_key
name
end
end
end
end
end