Sha256: 02799b19cfcda6cffcfcd5e2c221cbb35cbdd338820a71a5c8efdfb8a2987470
Contents?: true
Size: 1.43 KB
Versions: 6
Compression:
Stored size: 1.43 KB
Contents
# -*- encoding : utf-8 -*- module LoyalCore class Admin::Skin::FoldersController < ::LoyalAdmin::ApplicationController def index end def show @loyal_core_skin_folder = ::LoyalCore::Skin::Folder.find params[:id] @loyal_core_skin_recipes = @loyal_core_skin_folder.recipes.page(params[:page]) end def new @loyal_core_skin_folder = ::LoyalCore::Skin::Folder.new end def create @loyal_core_skin_folder = ::LoyalCore::Skin::Folder.new(params[:loyal_core_skin_folder]) @loyal_core_skin_folder.created_by = current_user.id @loyal_core_skin_folder.created_ip = request.remote_ip if @loyal_core_skin_folder.save redirect_to loyal_core_app.admin_skin_folder_url(:id => @loyal_core_skin_folder.id) else render :new end end def edit @loyal_core_skin_folder = ::LoyalCore::Skin::Folder.find params[:id] end def update @loyal_core_skin_folder = ::LoyalCore::Skin::Folder.find params[:id] if @loyal_core_skin_folder.update_attributes(params[:loyal_core_skin_folder]) redirect_to loyal_core_app.admin_skin_folder_url(:id => @loyal_core_skin_folder.id) else render :edit end end def destroy @loyal_core_skin_folder = ::LoyalCore::Skin::Folder.find params[:id] @loyal_core_skin_folder.destroy redirect_to params[:return_to] || loyal_core_app.admin_skin_folders_url end end end
Version data entries
6 entries across 6 versions & 1 rubygems