trugul-bot/models/raid.rb

12 lines
255 B
Ruby
Raw Normal View History

2015-04-25 13:17:47 -04:00
class Raid < ActiveRecord::Base
def money=(value)
value = value.to_s.gsub(/[$,]/, '').to_f
write_attribute(:money, value)
end
def soldiers=(value)
value = value.to_s.gsub(/[$,]/, '').to_f
write_attribute(:soldiers, value)
end
end