Refactor inflection to the Deliverable model.

This commit is contained in:
Eric Davis
2010-07-02 12:12:36 -07:00
parent 51aa37ac02
commit 117ed14679
2 changed files with 5 additions and 1 deletions
+4
View File
@@ -16,6 +16,10 @@ class Deliverable < ActiveRecord::Base
''
end
def to_underscore
self.class.to_s.underscore
end
def total=(v)
if v.is_a? String
write_attribute(:total, v.gsub(/[$ ,]/, ''))
+1 -1
View File
@@ -28,4 +28,4 @@
<%= link_to(l(:button_cancel), cancel_path) %>
<% end %>
<%= wikitoolbar_for resource.class.to_s.underscore + '_notes' %>
<%= wikitoolbar_for resource.to_underscore + '_notes' %>