title: Dynamically updating a list from select input
body: <p>On my page I have a list of all quotes entered into the database. I want to be able to select a user from a drop down box so that once that user is selected, the list of quotes gets updated so that it shows only quotes made by that user.</p>
  
  <p>The trouble I have is I'm not well versed in JavaScript which I believe is how most would solve this problem. I already have the code that updates the list based on the user I just don't understand how to use the JavaScript to update the list dynamically.</p>
  
  <p>A brief outline of my code:</p>
  
  <p><strong>Controller</strong></p>
  
  <pre><code>if quoted_by = "all"
    # Show every quote
  else
    # Show quotes only made by user
  end
  </code></pre>
  
  <p><strong>HTML</strong></p>
  
  <pre><code>&lt;span id="msQuotedBy"&gt;
      &lt;b&gt;Filter by Initials: &lt;/b&gt;
      &lt;%= select(:msQuotedBy, :select, ['all'] + @initials.collect {|p| [p, p]}, {:selected =&gt; @quoted_by}) %&gt;
  &lt;/span&gt;
  </code></pre>
  
  <p><strong>JavaScript</strong>, right now my JavaScript updates a calendar on the page dynamically just fine using the following code, but what should I do to update the list of quotes?</p>
  
  <pre><code>$('#msQuotedBy_select').change -&gt;
      $('#msCalendar').fullCalendar('rerenderEvents')
  </code></pre>
  
  <p>The Controller obviously isn't right but that's how the logic plays out in my head. How do I use the <code>('#msQuotedBy_select')</code> value to update the list like I do the calendar?</p>