Finishing tweaks for error reporting

pull/303/head
Rick Carlino 2016-12-12 12:35:18 -06:00
parent dcf668fb31
commit 7947f2906f
2 changed files with 10 additions and 13 deletions

View File

@ -18,4 +18,14 @@ class Device < ActiveRecord::Base
these = logs.last(max_log_count || DEFAULT_MAX_LOGS).pluck(:id)
logs.where.not(id: these).destroy_all
end
# This is for the error reporting tool.
def username
users.pluck(:name).join(", ")
end
# This is for the error reporting tool.
def email
users.pluck(:email).join(", ")
end
end

View File

@ -10,19 +10,6 @@
# own repo and out of the main app. |
# TODO: Move this into its own module. |
#=================================================+
class Device < ActiveRecord::Base
# This is for the error reporting tool.
def username
device.users.pluck(:name).join(" ")
end
# This is for the error reporting tool.
def email
device.users.pluck(:name).join(" ")
end
end
Rollbar.configure do |config|
config.access_token = ENV['ROLLBAR_ACCESS_TOKEN'] || "NO_ROLLBAR_ACCESS"
config.enabled = Rails.env.production? ? true : false