Sha256: f9a0e9a13976cffaa8cde4e37c4d65f593894bd8244b309789f4d1f35dde389c

Contents?: true

Size: 538 Bytes

Versions: 3

Compression:

Stored size: 538 Bytes

Contents

module Softwear
  class SpecDumpController < ApplicationController
    include Library::SpecDump

    helper Softwear::Engine.helpers do
      def method_missing(name, *args, &block)
        if main_app.respond_to?(name)   
          main_app.send(name, *args, &block)
        else                   
          super                
        end                    
      end
    end

    def dump
      type = params[:type].classify
      id   = params[:id].to_i

      render json: spec_dump(type.constantize.find(id))
    end
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
softwear-lib-3.3.7 app/controllers/softwear/spec_dump_controller.rb
softwear-lib-3.3.6 app/controllers/softwear/spec_dump_controller.rb
softwear-lib-3.3.5 app/controllers/softwear/spec_dump_controller.rb