Finishing tweaks for error reporting
parent
dcf668fb31
commit
7947f2906f
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue