Permalink
Browse files

Don't fail if 'nested' is nil.

  • Loading branch information...
1 parent 7192aa6 commit 6a1eea1b61395bf3d183fd169f815d0315b52d2f @r-stu31 committed Feb 29, 2012
Showing with 1 addition and 1 deletion.
  1. +1 −1 lib/active_scaffold/actions/nested.rb
@@ -217,7 +217,7 @@ def delete_existing_authorized?(record = nil)
end
def after_create_save(record)
- if nested.habtm?
+ if nested and nested.habtm?
params[:associated_id] = record
do_add_existing
end

0 comments on commit 6a1eea1

Please sign in to comment.