Rename LaborExpenses to LaborBudget, better description of the class.

This commit is contained in:
Eric Davis
2010-07-07 10:15:04 -07:00
parent c860834560
commit 68cd1ad895
9 changed files with 23 additions and 23 deletions
+1 -1
View File
@@ -1,7 +1,7 @@
module ContractsHelper
def setup_nested_deliverable_records(deliverable)
returning(deliverable) do |d|
d.labor_expenses.build if d.labor_expenses.empty?
d.labor_budgets.build if d.labor_budgets.empty?
end
end
end
+2 -2
View File
@@ -4,9 +4,9 @@ class Deliverable < ActiveRecord::Base
# Associations
belongs_to :contract
belongs_to :manager, :class_name => 'User', :foreign_key => 'manager_id'
has_many :labor_expenses
has_many :labor_budgets
accepts_nested_attributes_for :labor_expenses
accepts_nested_attributes_for :labor_budgets
# Validations
validates_presence_of :title
+1 -1
View File
@@ -1,4 +1,4 @@
class LaborExpense < ActiveRecord::Base
class LaborBudget < ActiveRecord::Base
unloadable
# Associations
+4 -4
View File
@@ -24,10 +24,10 @@
<%= form.input :total, :input_html => {:size => 10}, :wrapper_html => {:class => 'deliverable_total_input'} %>
<% form.inputs :name => l(:text_deliverable_finances), :id => 'deliverable-finances' do %>
<% form.semantic_fields_for :labor_expenses do |labor_expense| %>
<% labor_expense.inputs :name => l(:field_labor) do %>
<%= labor_expense.input :hours, :label => l(:text_short_hours), :input_html => {:size => 10} %>
<%= labor_expense.input :budget, :label => l(:text_dollar_sign), :input_html => {:size => 10} %>
<% form.semantic_fields_for :labor_budgets do |labor_budget| %>
<% labor_budget.inputs :name => l(:field_labor) do %>
<%= labor_budget.input :hours, :label => l(:text_short_hours), :input_html => {:size => 10} %>
<%= labor_budget.input :budget, :label => l(:text_dollar_sign), :input_html => {:size => 10} %>
<% end %>
<% end %>
<% end %>