Sha256: eb1e46343b451d729755b49d553c441dfe8adb78191e575a4b887f5c5fd31e86

Contents?: true

Size: 682 Bytes

Versions: 2

Compression:

Stored size: 682 Bytes

Contents

class Cms::PortletsController < Cms::ContentBlockController
  
  protected
    def build_block
      if params[:type].blank?
        @block = model_class.new
      else
        @block = params[:type].classify.constantize.new(params[params[:type]])
      end
    end
    
    def update_block
      load_block
      @block.update_attributes(params[@block.class.name.underscore])
    end    
    
    def block_form
      "portlets/portlets/form"
    end
    
    def new_block_path
      new_cms_portlet_path
    end
  
    def block_path(action=nil)
      send("#{action ? "#{action}_" : ""}cms_portlet_path", @block)
    end

    def blocks_path
      cms_portlets_path
    end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
nate-browsercms-3.0.210 app/controllers/cms/portlets_controller.rb
nate-browsercms-3.0.211 app/controllers/cms/portlets_controller.rb