Sha256: 60552e7c2b410746c318203deaef194b43dcd30b9b0496f13fd0feed03617d87

Contents?: true

Size: 431 Bytes

Versions: 1

Compression:

Stored size: 431 Bytes

Contents

module Ryakuzu
  class RootController < ActionController::Base
    layout 'ryakuzu/layouts/application'

    rescue_from Errno::ENOENT, with: :render_500
    helper_method :schema_present?

    private

    def render_500
      @disable = true
      render template: 'ryakuzu/main/error_500', status: 500
    end

    def schema_present?
      schema = Rails.root.join('db', 'schema.rb')
      File.file?(schema)
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
ryakuzu-0.3.0 app/controllers/ryakuzu/root_controller.rb