app/models/offerings/offering.rb
def create_starting_statuses
    new_status_attributes = { :public_title => "New",
                              :application_status_type => ApplicationStatusType.find_or_create_by_name("new"),
                              :disallow_user_edits => 0,
                              :disallow_all_edits => 0,
                              :allow_application_edits => 1 }
    statuses.create(new_status_attributes)
    in_progress_status_attributes = { :public_title => "In Progress",
                              :application_status_type => ApplicationStatusType.find_or_create_by_name("in_progress"),
                              :disallow_user_edits => 0,
                              :disallow_all_edits => 0,
                              :allow_application_edits => 1 }
    statuses.create(in_progress_status_attributes)
    submitted_status_attributes = { :public_title => "Submitted",
                              :application_status_type => ApplicationStatusType.find_or_create_by_name("submitted"),
                              :disallow_user_edits => 1,
                              :disallow_all_edits => 0,
                              :allow_application_edits => 0 }
    statuses.create(submitted_status_attributes)
  end
# Every offering starts with three default statuses: New, In Progress, and Submitted.
Every offering starts with three default statuses: New, In Progress, and Submitted.
Every offering starts with three default statuses : New In Progress and Submitted .
def create_starting_statuses
    new_status_attributes = { :public_title => "New",
                              :application_status_type => ApplicationStatusType.find_or_create_by_name("new"),
                              :disallow_user_edits => 0,
                              :disallow_all_edits => 0,
                              :allow_application_edits => 1 }
    statuses.create(new_status_attributes)
    in_progress_status_attributes = { :public_title => "In Progress",
                              :application_status_type => ApplicationStatusType.find_or_create_by_name("in_progress"),
                              :disallow_user_edits => 0,
                              :disallow_all_edits => 0,
                              :allow_application_edits => 1 }
    statuses.create(in_progress_status_attributes)
    submitted_status_attributes = { :public_title => "Submitted",
                              :application_status_type => ApplicationStatusType.find_or_create_by_name("submitted"),
                              :disallow_user_edits => 1,
                              :disallow_all_edits => 0,
                              :allow_application_edits => 0 }
    statuses.create(submitted_status_attributes)
  end
def create_starting_statuses new_status_attributes = { :public_title => "New" , :application_status_type => ApplicationStatusType . find_or_create_by_name ( "new" ) , :disallow_user_edits => 0 , :disallow_all_edits => 0 , :allow_application_edits => 1 } statuses . create ( new_status_attributes ) in_progress_status_attributes = { :public_title => "In Progress" , :application_status_type => ApplicationStatusType . find_or_create_by_name ( "in_progress" ) , :disallow_user_edits => 0 , :disallow_all_edits => 0 , :allow_application_edits => 1 } statuses . create ( in_progress_status_attributes ) submitted_status_attributes = { :public_title => "Submitted" , :application_status_type => ApplicationStatusType . find_or_create_by_name ( "submitted" ) , :disallow_user_edits => 1 , :disallow_all_edits => 0 , :allow_application_edits => 0 } statuses . create ( submitted_status_attributes ) end
Every offering starts with three default statuses: New, In Progress, and Submitted.
Every offering starts with three default statuses : New In Progress and Submitted .