Sha256: c7caae8fd0d43986c67742b338a075f16742db2d9343cf111f12c6e7a15018b2

Contents?: true

Size: 553 Bytes

Versions: 1

Compression:

Stored size: 553 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("#{Rails.root}/log/model_log_#{Rails.env}.log", "a+") do |output|
        output.write(content)
      end
    end
  end

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

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
model_log-1.0.2 lib/model_log.rb