Refactor inflection to the Deliverable model.

This commit is contained in:
Eric Davis committed 2010-07-02 12:12:36 -07:00
1 parent 51aa37ac02
commit 117ed14679
2 files changed
+5 -1

No files matched your search

+4
View File
@@ -16,6 +16,10 @@ class Deliverable < ActiveRecord::Base
'' ''
end end
def to_underscore
self.class.to_s.underscore
end
def total=(v) def total=(v)
if v.is_a? String if v.is_a? String
write_attribute(:total, v.gsub(/[$ ,]/, '')) write_attribute(:total, v.gsub(/[$ ,]/, ''))
+1 -1
View File
@@ -28,4 +28,4 @@
<%= link_to(l(:button_cancel), cancel_path) %> <%= link_to(l(:button_cancel), cancel_path) %>
<% end %> <% end %>
<%= wikitoolbar_for resource.class.to_s.underscore + '_notes' %> <%= wikitoolbar_for resource.to_underscore + '_notes' %>