[#4420] Add the frequency field for Retainers to the Model and View.

This commit is contained in:
Eric Davis
2010-08-16 14:47:47 -07:00
parent 8321903598
commit 3e30629d44
4 changed files with 31 additions and 1 deletions
+17
View File
@@ -5,4 +5,21 @@
class RetainerDeliverable < HourlyDeliverable
unloadable
# Associations
# Validations
ValidFrequencies = ["monthly", "quarterly"]
validates_inclusion_of :frequency, :in => ValidFrequencies, :allow_nil => true, :allow_blank => true
# Accessors
# Callbacks
def short_type
'R'
end
def self.frequencies_to_select
ValidFrequencies.collect {|f| [l("text_#{f}"), f]}
end
end