Sha256: 4682e8832b1a85d1dde7cb6e269e6542c5976324786febb5a9a7a4b7b67690cb
Contents?: true
Size: 834 Bytes
Versions: 11
Compression:
Stored size: 834 Bytes
Contents
#coding: utf-8 class Redditor::Admin::TextBlocksController < Redditor::Admin::BaseController def new @content_block = @page.text_blocks.build(content_block_params) render "redditor/admin/pages/new" end def update @content_block = @page.text_blocks.find(params[:id]) @content_block.update_attributes(content_block_params) render "redditor/admin/pages/wrapper" end def create @content_block = @page.text_blocks.build(content_block_params) @content_block.save render "redditor/admin/pages/wrapper" end def destroy @content_block = @page.text_blocks.find(params[:id]) if @content_block.destroy render :js => "$('#text_block_#{@content_block.id}').closest('dd').remove();" else render :js => "alert('Контент-блок не удален');" end end end
Version data entries
11 entries across 11 versions & 1 rubygems