Sha256: f320e1a3677078eedbe5af5bf9b168db37c90461bee1e5a63a29287a8da14433
Contents?: true
Size: 546 Bytes
Versions: 25
Compression:
Stored size: 546 Bytes
Contents
class Admin::PagePartsController < Admin::BaseController def new render :partial => "/admin/pages/page_part_field", :locals => { :part => PagePart.new(:title => params[:title], :body => params[:body]), :new_part => true, :part_index => params[:part_index] } end def destroy part = PagePart.find(params[:id]) page = part.page if part.destroy page.reposition_parts! render :text => "'#{part.title}' deleted." else render :text => "'#{part.title}' not deleted." end end end
Version data entries
25 entries across 25 versions & 1 rubygems