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

Version Path
abstractor-2.1.2 lib/abstractor/methods/controllers/abstractor_abstractions_controller.rb
abstractor-2.1.01 lib/abstractor/methods/controllers/abstractor_abstractions_controller.rb
abstractor-2.1.0 lib/abstractor/methods/controllers/abstractor_abstractions_controller.rb
abstractor-2.0.1 lib/abstractor/methods/controllers/abstractor_abstractions_controller.rb
abstractor-2.0.0 lib/abstractor/methods/controllers/abstractor_abstractions_controller.rb
abstractor-1.0.23 lib/abstractor/methods/controllers/abstractor_abstractions_controller.rb
abstractor-1.0.22 lib/abstractor/methods/controllers/abstractor_abstractions_controller.rb
abstractor-1.0.20 lib/abstractor/methods/controllers/abstractor_abstractions_controller.rb