Skip to content

Instantly share code, notes, and snippets.

View jgrant29's full-sized avatar

Justin Grant jgrant29

  • hrsimple
  • San Jose
View GitHub Profile
JavaScript
Hey mentor,
I was working through an assignment last night and came across a bug. I'm so confused!
The text in the alert is showing up as "undefined" instead of either "A Unicorn", "A hug", or "Fresh Laundry" and I'm not quite sure what's going on. Can you point me in the right direction?
-Student
</br>
<%= form_tag(searches_path, :method => 'get') do %>
<div class="row">
<div class="col-lg-12 pull-right">
<div class="input-group">
<%= text_field_tag :search, params[:search], class: 'form-control', placeholder: "Search for..." %>
<span class="input-group-btn">
<%= submit_tag "Go!", class: "btn btn-success" %>
</span>
</div>