Refactor inflection to the Deliverable model.
This commit is contained in:
@@ -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(/[$ ,]/, ''))
|
||||
|
||||
@@ -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' %>
|
||||
|
||||
Reference in New Issue
Block a user