title: How can I use masks on f.input on Rails?
body: <p>First of all, sorry if I made language mistakes, this is not my mother tongue.</p>
  
  <p>I'm learning RoR and I'm building a CRUD to register the information of a lot of computers, and I'm using Simple Form to generate the forms. My question is, how can I use masks in the f.input element? </p>
  
  <p>Like when the user goes to insert the Ip adress, he get something like ---.---.---.--- in the text field.</p>
  
  <p>if helps, here is this part of the form:</p>
  
  <pre><code>&lt;div class="field"&gt;
      &lt;%= f.input :mac_adress, label: 'Type the machine\'s MAC ADRESS: ', placeholder: 'XX:XX:XX:XX:XX:XX' %&gt;
  &lt;/div&gt;
  &lt;div class="field"&gt; 
      &lt;%= f.input :patrimony, label: 'What is the patrimony number? ', placeholder: 'XXXXXX' %&gt;
  &lt;/div&gt;
  &lt;div class="field"&gt; 
      &lt;%= f.input :ip, label: 'Inform the IP adress: ', placeholder: 'XXX.XXX.XXX.XXX' %&gt;
  &lt;/div&gt;
  &lt;div class="field"&gt; 
      &lt;%= f.label :lab_id %&gt;: 
      &lt;%= f.text_field :lab_id, :value =&gt; @machine.lab.name, :hidden =&gt; true %&gt;
  &lt;/div&gt;
  &lt;div class="actions"&gt;
      &lt;%= f.button :submit %&gt;
  &lt;/div&gt;
  </code></pre>
  
  <p>Thanks for any help, and if any additional information needed just ask.</p>