Sha256: bebbc597fe1eead7110bbf6ddb341d1ecf10571edb2ba2f52f39fef569995dc8

Contents?: true

Size: 430 Bytes

Versions: 63

Compression:

Stored size: 430 Bytes

Contents

module QuestionnairesControllable
  extend ActiveSupport::Concern

  private

  def convert_school_name_to_id(questionnaire)
    if questionnaire[:school_name]
      school = School.where(name: questionnaire[:school_name]).first
      school = School.create(name: questionnaire[:school_name]) if school.blank?
      questionnaire[:school_id] = school.id
      questionnaire.delete :school_name
    end
    questionnaire
  end
end

Version data entries

63 entries across 63 versions & 1 rubygems

Version Path
hackathon_manager-0.14.1 app/controllers/concerns/questionnaires_controllable.rb
hackathon_manager-0.14.0 app/controllers/concerns/questionnaires_controllable.rb
hackathon_manager-0.13.12 app/controllers/concerns/questionnaires_controllable.rb
hackathon_manager-0.13.11 app/controllers/concerns/questionnaires_controllable.rb
hackathon_manager-0.13.10 app/controllers/concerns/questionnaires_controllable.rb
hackathon_manager-0.13.9 app/controllers/concerns/questionnaires_controllable.rb
hackathon_manager-0.13.8 app/controllers/concerns/questionnaires_controllable.rb
hackathon_manager-0.13.7 app/controllers/concerns/questionnaires_controllable.rb
hackathon_manager-0.13.6 app/controllers/concerns/questionnaires_controllable.rb
hackathon_manager-0.13.5 app/controllers/concerns/questionnaires_controllable.rb
hackathon_manager-0.13.4 app/controllers/concerns/questionnaires_controllable.rb
hackathon_manager-0.13.3 app/controllers/concerns/questionnaires_controllable.rb
hackathon_manager-0.13.2 app/controllers/concerns/questionnaires_controllable.rb
hackathon_manager-0.13.1 app/controllers/concerns/questionnaires_controllable.rb
hackathon_manager-0.13.0 app/controllers/concerns/questionnaires_controllable.rb
hackathon_manager-0.12.2 app/controllers/concerns/questionnaires_controllable.rb
hackathon_manager-0.12.1 app/controllers/concerns/questionnaires_controllable.rb
hackathon_manager-0.12.0 app/controllers/concerns/questionnaires_controllable.rb
hackathon_manager-0.11.2 app/controllers/concerns/questionnaires_controllable.rb
hackathon_manager-0.11.1 app/controllers/concerns/questionnaires_controllable.rb