Sha256: ba35dee672c949983e9dcf9daede61f914ee9754a061d9c48a297a256ad77b64
Contents?: true
Size: 749 Bytes
Versions: 7
Compression:
Stored size: 749 Bytes
Contents
class WysihatFilesController < ApplicationController def index @wysihat_file, @wysihat_files = WysihatFile.new, WysihatFile.all render :layout => false end def create @wysihat_file = WysihatFile.new(params[:wysihat_file]) responds_to_parent do render :update do |page| if(@wysihat_file.save) page.insert_html :bottom, :wysihat_files, :partial => 'wysihat_file', :object => @wysihat_file end end end end def destroy @wysihat_file = WysihatFile.find(params[:id]) respond_to do |wants| wants.js { render :update do |page| page.remove "wysihat_file_#{@wysihat_file.id}" end } end @wysihat_file.destroy end end
Version data entries
7 entries across 7 versions & 2 rubygems