title: Bootstrap Loading State not working in erb view
body: <p>I'm trying to use the Bootstrap "Loading" state (<a href="http://getbootstrap.com/javascript/#buttons" rel="nofollow">http://getbootstrap.com/javascript/#buttons</a>) for a submit button in my rails application but it doesn't seem to work. My old code is:</p>
  
  <pre><code>&lt;%= f.submit nil, :class =&gt; 'btn btn-primary' %&gt;
  </code></pre>
  
  <p>and I replaced it with</p>
  
  <pre><code> &lt;%= f.submit nil, :class =&gt; 'btn btn-primary', :id =&gt; "loading-example-btn", :data-loading-text =&gt; "Loading..." %&gt;
  </code></pre>
  
  <p>like the example says.</p>
  
  <p>However, now I get the following error:</p>
  
  <pre><code>undefined local variable or method `loading' for #&lt;#&lt;Class:0x1c60494a&gt;:0xb590dde&gt;
  </code></pre>
  
  <p>which I'm assuming means that the "data-loading-text" part isn't working... does anyone know why that is or can anyone help me out?</p>
  
  <p>Thanks!</p>