<% select_option = [] (select_option << ['项目', 'projects']) if project_type == Project::ProjectType_project (select_option << ['课程', 'courses']) if project_type == Project::ProjectType_course select_option << ['用户', 'users'] #select_option << ['教师', 'users_teacher'], #select_option << ['学生', 'users_student'] %> <%= form_tag({controller: :welcome, action: :search }, method: :get) do %> <% end %>