Sha256: fc23caaa4d80af506b0c6f94f8626fb0e7a0e2325f0aee53179140c3434f3afd

Contents?: true

Size: 694 Bytes

Versions: 1

Compression:

Stored size: 694 Bytes

Contents

require "vanity/rails/helpers"
require "vanity/rails/testing"
require "vanity/rails/dashboard"

# Include in controller, add view helper methods.
ActionController::Base.class_eval do
  extend Vanity::Rails::ClassMethods
  include Vanity::Rails
  helper Vanity::Rails
end

Rails.configuration.after_initialize do
  # Use Rails logger by default.
  Vanity.playground.logger ||= ActionController::Base.logger
  Vanity.playground.load_path = "#{RAILS_ROOT}/experiments"

  # Do this at the very end of initialization, allowing test environment to do
  # Vanity.playground.mock! before any database access takes place.
  Rails.configuration.after_initialize do
    Vanity.playground.load!
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
vanity-1.2.0 lib/vanity/rails.rb