Sha256: f2ccf47e75ca209e989fc32c305ca309e3d8b5e14685bcb56dcc15e929bea013

Contents?: true

Size: 411 Bytes

Versions: 5

Compression:

Stored size: 411 Bytes

Contents

# coding: UTF-8

module Rescue
  module Controller
    module Static

      def self.included(base)
        base.class_eval do
          define_method Rescue.config.respond_name do |code, exception = nil|
            render status: code, file: "#{Rails.root}/public/#{code}", layout: false and return
          end
        end
        base.extend Rescue::Controller::ClassMethods
      end
  
    end
  end
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
rescue-dog-0.3.2 lib/rescue/controllers/static.rb
rescue-dog-0.3.1 lib/rescue/controllers/static.rb
rescue-dog-0.3.0 lib/rescue/controllers/static.rb
rescue-dog-0.2.1 lib/rescue/controllers/static.rb
rescue-dog-0.2.0 lib/rescue/controllers/static.rb