Refactor inflection to the Deliverable model.
This commit is contained in:
1 parent
51aa37ac02
commit
117ed14679
2 files changed
+5
-1
No files matched your search
@@ -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(/[$ ,]/, ''))
|
||||||
|
|||||||
@@ -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' %>
|
||||||
Reference in new issue
Block a user