Skip to content

Commit

Permalink
rename node variable to _node in crud.rb update_child_positions to av…
Browse files Browse the repository at this point in the history
…oid conflict with model named Node
  • Loading branch information
Bernd Eickhoff committed Dec 16, 2011
1 parent ea6db31 commit 12bfde2
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions core/lib/refinery/crud.rb
Expand Up @@ -276,8 +276,8 @@ def update_positions
render :nothing => true
end
def update_child_positions(node, #{singular_name})
node['children']['0'].each do |_, child|
def update_child_positions(_node, #{singular_name})
_node['children']['0'].each do |_, child|
child_id = child['id'].split(/#{singular_name}\_?/)
child_#{singular_name} = #{class_name}.where(:id => child_id).first
child_#{singular_name}.move_to_child_of(#{singular_name})
Expand Down

0 comments on commit 12bfde2

Please sign in to comment.