Permalink
Browse files

Detect, but not implement, has_many through relationships.

  • Loading branch information...
1 parent 44b8726 commit 86dc0b4b1bd131bca85b67e81f99b954fbfaf2ef Francesc Esplugas committed Feb 9, 2010
Showing with 5 additions and 1 deletion.
  1. +5 −1 app/helpers/admin/form_helper.rb
@@ -117,7 +117,11 @@ def typus_relationships
when :has_and_belongs_to_many
html << typus_form_has_and_belongs_to_many(relationship)
when :has_many
- html << typus_form_has_many(relationship)
+ if association.options[:through]
+ # Here we will shot the relationship. Better this than raising an error.
+ else
+ html << typus_form_has_many(relationship)
+ end
when :has_one
html << typus_form_has_one(relationship)
end

0 comments on commit 86dc0b4

Please sign in to comment.