Sha256: 77dcb450eb99575f41c605a0f270c13fbaf5a2ef6f5864049111be3fdf911164
Contents?: true
Size: 1.11 KB
Versions: 8
Compression:
Stored size: 1.11 KB
Contents
# -*- encoding : utf-8 -*- module MustacheRender::Manage class FoldersController < BaseController def index end def show @mustache_render_folder = MustacheRenderFolder.find params[:id] @mustache_render_templates = @mustache_render_folder.templates end def new @mustache_render_folder = MustacheRenderFolder.new(:parent_id => params[:parent_id]) end def edit @mustache_render_folder = MustacheRenderFolder.find params[:id] end def create @mustache_render_folder = MustacheRenderFolder.new(params[:mustache_render_folder]) if @mustache_render_folder.save redirect_to mustache_render_manage_folder_url(@mustache_render_folder) else render :new end end def update @mustache_render_folder = MustacheRenderFolder.find params[:id] if @mustache_render_folder.update_attributes(params[:mustache_render_folder]) redirect_to mustache_render_manage_folder_url(@mustache_render_folder) else render :edit end end def destroy # TODO: 是否增加删除功能 end end end
Version data entries
8 entries across 8 versions & 1 rubygems