Sha256: 85f3c288e6087501e1ddd802b4851b5a80b71b136fba2f6e5ebde976bae23688

Contents?: true

Size: 579 Bytes

Versions: 1

Compression:

Stored size: 579 Bytes

Contents

require "model_log/version"
require "model_log/passport"
require "model_log/request"
require "model_log/class_methods/models"
require "model_log/class_methods/controllers"

module ModelLog
  class << self
    attr_accessor :platform, :current_user_method, :user_name_field

    def info(content)
      content = content.chomp + "\n"
      File.open("log/model_log_#{Rails.env}.log", "a+") do |output|
        output.write(content)
      end
    end
  end

  @current_user_method = @current_user_method || :current_passport
  @user_name_field = @user_name_field || :username
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
model_log-1.0.0 lib/model_log.rb