[#4181] Add a total field to deliverables.
This commit is contained in:
1 parent
7efaf8dbe2
commit
ae8c75a051
6 files changed
+47
-1
No files matched your search
@@ -16,6 +16,14 @@ class Deliverable < ActiveRecord::Base
|
||||
''
|
||||
end
|
||||
|
||||
def total=(v)
|
||||
if v.is_a? String
|
||||
write_attribute(:total, v.gsub(/[$ ,]/, ''))
|
||||
else
|
||||
write_attribute(:total, v)
|
||||
end
|
||||
end
|
||||
|
||||
if Rails.env.test?
|
||||
generator_for :title, :method => :next_title
|
||||
|
||||
|
||||
Reference in new issue
Block a user