Sha256: 1ee8cae21558abb9b3184617c66208aaafc7f4da1d2c32c9d8fa4688082e4267

Contents?: true

Size: 882 Bytes

Versions: 17

Compression:

Stored size: 882 Bytes

Contents

# frozen_string_literal: true

require 'tramway/core/engine'
require 'tramway/collection'
require 'tramway/collections/helper'
require 'tramway/error'
require 'font_awesome5_rails'
require 'reform'
require 'pg_search'
require 'validators/presence_validator'

module Tramway::Core
  class << self
    def initialize_application(**options)
      @application ||= Tramway::Core::Application.new
      options.each do |attr, value|
        @application.send "#{attr}=", value
      end
    end

    def application_object
      if @application&.model_class.present?
        begin
          @application.model_class.first
        rescue StandardError
          nil
        end
      else
        @application
      end
    end

    def root
      File.dirname __dir__
    end

    attr_reader :application
  end
end

# HACK: FIXME

class ActiveModel::Errors
  def merge!(*args); end
end

Version data entries

17 entries across 17 versions & 1 rubygems

Version Path
tramway-core-1.17.9.1 lib/tramway/core.rb
tramway-core-1.17.9 lib/tramway/core.rb
tramway-core-1.17.8 lib/tramway/core.rb
tramway-core-1.17.7.2 lib/tramway/core.rb
tramway-core-1.17.7.1 lib/tramway/core.rb
tramway-core-1.17.7 lib/tramway/core.rb
tramway-core-1.17.6.1 lib/tramway/core.rb
tramway-core-1.17.6 lib/tramway/core.rb
tramway-core-1.17.5 lib/tramway/core.rb
tramway-core-1.17.4.2 lib/tramway/core.rb
tramway-core-1.17.4.1 lib/tramway/core.rb
tramway-core-1.17.4 lib/tramway/core.rb
tramway-core-1.17.3.1 lib/tramway/core.rb
tramway-core-1.17.3 lib/tramway/core.rb
tramway-core-1.17.2.5 lib/tramway/core.rb
tramway-core-1.17.2.4 lib/tramway/core.rb
tramway-core-1.17.2.3 lib/tramway/core.rb