[#4420] Refactor: extract duplicated data to query.
This commit is contained in:
1 parent
1120b39ed6
commit
4b162f85bf
3 files changed
+13
-2
No files matched your search
@@ -72,6 +72,17 @@ class Deliverable < ActiveRecord::Base
|
||||
type == "RetainerDeliverable"
|
||||
end
|
||||
|
||||
def self.valid_types
|
||||
['FixedDeliverable','HourlyDeliverable','RetainerDeliverable']
|
||||
end
|
||||
|
||||
def self.valid_types_to_select
|
||||
valid_types.inject([]) do |types, type|
|
||||
types << [type.gsub(/Deliverable/i,''), type]
|
||||
types
|
||||
end
|
||||
end
|
||||
|
||||
if Rails.env.test?
|
||||
generator_for :title, :method => :next_title
|
||||
|
||||
|
||||
Reference in new issue
Block a user