app/models/offerings/offering_admin_phase.rb
def task(str, create_if_nil = false)
    t = tasks.find(:all).reject{|t| t.title.gsub(/\s/,"_").underscore != str.to_s.gsub(/\s/,"_").underscore}.first
    t = tasks.create(:title => str.to_s.humanize) if t.nil?
    t
  end
# Finds a task associated with this OfferingAdminPhase using the string that is passed. If +create_if_nil+ is set to +true+, then
# this method will create a new task using the first parameter as the task title.
Finds a task associated with this OfferingAdminPhase using the string that is passed. If +create_if_nil+ is set to +true+, then
this method will create a new task using the first parameter as the task title.
Finds a task associated with this OfferingAdminPhase using the string that is passed . If + create_if_nil + is set to + true + then this method will create a new task using the first parameter as the task title .
def task(str, create_if_nil = false)
    t = tasks.find(:all).reject{|t| t.title.gsub(/\s/,"_").underscore != str.to_s.gsub(/\s/,"_").underscore}.first
    t = tasks.create(:title => str.to_s.humanize) if t.nil?
    t
  end
def task ( str , create_if_nil = false ) t = tasks . find ( :all ) . reject { | t | t . title . gsub ( / \s / , "_" ) . underscore != str . to_s . gsub ( / \s / , "_" ) . underscore } . first t = tasks . create ( :title => str . to_s . humanize ) if t . nil? t end
Finds a task associated with this OfferingAdminPhase using the string that is passed.
Finds a task associated with this OfferingAdminPhase using the string that is passed .
str
create_if_nil