title: Rails AJAX Get Call
body: <p>I'm sorry this is a broad question. I need some guidance though. </p>
  
  <p>I have this AJAX call:</p>
  
  <pre><code>        $('#testyo').click(function(){
              $.ajax({
                  type: 'GET',
                  url: "../messages/drew",
                  success:function(data){
                   alert(data);
                  }
              });
              return false;
          });
  </code></pre>
  
  <p>which calls this rails method</p>
  
  <pre><code>  def show
      username = params[:id]
      @client = Twilio::REST::Client.new Rails.application.config.account_sid, Rails.application.config.auth_token
      @account = @client.account 
      received_messages = @account.messages.list
    end
  </code></pre>
  
  <p>it takes the params "drew", just as a test, but I don't know how to pass data back to the ajax call. the alert(data) isnt showing anything. I'm I missing something somewhere?</p>