summaryrefslogtreecommitdiff
path: root/app/models/remote_username.rb
blob: 8c1ce26d8247b7719c27d34c18055402c5daae33 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
class RemoteUsername < ActiveRecord::Base
	belongs_to :game
	belongs_to :user

	def value
		begin
			return JSON.parse(self.json_value)
		rescue
			return {}
		end
	end

	def value=(v)
		self.json_value = v.to_json
	end
end