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.5.11 app/controllers/concerns/questionnaires_controllable.rb
hackathon_manager-0.5.10 app/controllers/concerns/questionnaires_controllable.rb
hackathon_manager-0.5.9 app/controllers/concerns/questionnaires_controllable.rb
hackathon_manager-0.5.8 app/controllers/concerns/questionnaires_controllable.rb
hackathon_manager-0.5.7 app/controllers/concerns/questionnaires_controllable.rb
hackathon_manager-0.5.6 app/controllers/concerns/questionnaires_controllable.rb
hackathon_manager-0.5.5 app/controllers/concerns/questionnaires_controllable.rb
hackathon_manager-0.5.4 app/controllers/concerns/questionnaires_controllable.rb
hackathon_manager-0.5.3 app/controllers/concerns/questionnaires_controllable.rb
hackathon_manager-0.5.2 app/controllers/concerns/questionnaires_controllable.rb
hackathon_manager-0.5.1 app/controllers/concerns/questionnaires_controllable.rb
hackathon_manager-0.5.0 app/controllers/concerns/questionnaires_controllable.rb
hackathon_manager-0.4.4 app/controllers/concerns/questionnaires_controllable.rb
hackathon_manager-0.4.3 app/controllers/concerns/questionnaires_controllable.rb
hackathon_manager-0.4.2 app/controllers/concerns/questionnaires_controllable.rb
hackathon_manager-0.4.1 app/controllers/concerns/questionnaires_controllable.rb
hackathon_manager-0.4.0 app/controllers/concerns/questionnaires_controllable.rb
hackathon_manager-0.3.3 app/controllers/concerns/questionnaires_controllable.rb
hackathon_manager-0.3.2 app/controllers/concerns/questionnaires_controllable.rb
hackathon_manager-0.3.1 app/controllers/concerns/questionnaires_controllable.rb