Sha256: f411a0157e5f4f1d8c6803137a593f421e822648df9f16728a4f7e152c9ff538
Contents?: true
Size: 387 Bytes
Versions: 16
Compression:
Stored size: 387 Bytes
Contents
module Qbrick module PageTree extend self def update(params, parent_id = nil) params.each do |page_position, page_content| page = Page.find(page_content['id']) page.update_attributes(parent_id: parent_id, position: page_position) next if page_content['children'].nil? update(page_content['children'], page.id) end end end end
Version data entries
16 entries across 16 versions & 1 rubygems