title: Ruby on Rails: Changing friendly URL based on database value
body: <p>I currently have my URL set up where it will be like this:</p>
  
  <pre><code>localhost:3000/user/3
  </code></pre>
  
  <p>using this in my routes file:</p>
  
  <pre><code>resources :users, path: '/user' do
  </code></pre>
  
  <p>Technically I can change <code>/user</code> to anything if I want to change it, for example: <code>/profile</code> will then turn into this:</p>
  
  <pre><code>localhost:3000/profile/3
  </code></pre>
  
  <p>But what if I have certain options for users at signup to choose from, if they're using my application as a:</p>
  
  <p><code>Designer</code>, <code>Developer</code>, <code>Assistant</code></p>
  
  <p>So when user signs up, and chooses from among those three, it'll save into my database under <code>user_as</code> column, and it'll be spelled out in the cells.</p>
  
  <hr>
  
  <p>So how does do I change <code>/user</code> based on the <code>user_as</code>? I'd like to have either <code>/designer</code>, <code>/developer</code>, or <code>/assistant</code></p>