Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit c8e9114

Browse files
committedMay 15, 2014
Assert valid keys to avoid typos and headaches
1 parent d497779 commit c8e9114

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed
 

‎lib/closure_tree/acts_as_tree.rb

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,11 @@
1111
module ClosureTree
1212
module ActsAsTree
1313
def acts_as_tree(options = {})
14+
options.assert_valid_keys(:name, :dependent, :order,
15+
:parent_column_name, :name_column,
16+
:hierarchy_class_name, :hierarchy_table_name,
17+
:with_advisory_lock, :base_class)
18+
1419
class_attribute :_ct
1520
self._ct = ClosureTree::Support.new(self, options)
1621

0 commit comments

Comments
 (0)
Failed to load comments.