Sha256: 76864b056fa46b2b1ce6d4dd6d424288069ad1623f6f4de09c02d04894043bed
Contents?: true
Size: 1.52 KB
Versions: 8
Compression:
Stored size: 1.52 KB
Contents
module Abstractor module Methods module Controllers module AbstractorAbstractionsController def self.included(base) base.send :before_filter, :set_abstractor_abstraction, :only => [:show, :edit, :update] end def index end def show respond_to do |format| format.html { render :layout => false } end end def edit respond_to do |format| format.html { render :layout => false } end end def update respond_to do |format| if @abstractor_abstraction.update_attributes(params[:abstractor_abstraction]) format.html { redirect_to(abstractor_abstraction_path(@abstractor_abstraction)) } else format.html { render :action => "edit" } end end end def update_all abstractor_abstraction_value = params[:abstractor_abstraction_value] @about = params[:about_type].constantize.find(params[:about_id]) Abstractor::AbstractorAbstraction.update_abstractor_abstraction_other_value(@about.abstractor_abstractions, abstractor_abstraction_value) respond_to do |format| format.html { redirect_to :back } end end private def set_abstractor_abstraction @abstractor_abstraction = Abstractor::AbstractorAbstraction.find(params[:id]) @about = @abstractor_abstraction.about end end end end end
Version data entries
8 entries across 8 versions & 1 rubygems