lib/model_log.rb in model_log-1.0.1 vs lib/model_log.rb in model_log-1.0.2
- old
+ new
@@ -8,15 +8,15 @@
class << self
attr_accessor :platform, :current_user_method, :user_name_field
def info(content)
content = content.chomp + "\n"
- File.open("#{Rails.root.to_s}/log/model_log_#{Rails.env}.log", "a+") do |output|
+ File.open("#{Rails.root}/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
+ @current_user_method ||= :current_passport
+ @user_name_field ||= :username
end