app/models/cms_page.rb
# Transforms existing cms_block information into a hash that can be used
# during form processing. That's the only way to modify cms_blocks.
Transforms existing cms_block information into a hash that can be used
during form processing. That's the only way to modify cms_blocks.
Transforms existing cms_block information into a hash that can be used during form processing . That ' s the only way to modify cms_blocks .
def cms_blocks_attributes
    self.cms_blocks.inject([]) do |arr, block|
      block_attr = {}
      block_attr[:label]    = block.label
      block_attr[:content]  = block.content
      block_attr[:id]       = block.id
      arr << block_attr
    end
  end
def cms_blocks_attributes self . cms_blocks . inject ( [ ] ) do | arr , block | block_attr = { } block_attr [ :label ] = block . label block_attr [ :content ] = block . content block_attr [ :id ] = block . id arr << block_attr end end
Transforms existing cms_block information into a hash that can be used
during form processing.
Transforms existing cms_block information into a hash that can be used during form processing .