title: Rails: Adding params to a Devise registration form through radio buttons
body: <p>To enable different roles for users, I added some roles to the <em>User</em> model…</p>
  
  <pre><code># class AddRolesToUser &lt; ActiveRecord::Migration
     add_column :users, :host, :boolean, :default =&gt; false
     add_column :users, :company, :boolean, :default =&gt; false
  </code></pre>
  
  <p>and extended the registration form:</p>
  
  <pre><code>   &lt;%= radio_button_tag(:role, "host") %&gt;
     &lt;%= label_tag(:role, "Host") %&gt;
     &lt;%= radio_button_tag(:role, "company") %&gt;
     &lt;%= label_tag(:role, "Company") %&gt;
  </code></pre>
  
  <p>Then, in UsersController, i'd like to check for the parameter for <em>role</em> (e.g. "host") and mark the boolean field in the record as <em>true</em>:</p>
  
  <pre><code>  # users_controller.rb  
        if params[:role] == "host"
          params[:user][:host] = true
        elsif params[:role] == "company"
          params[:user][:company] = true
        end
        @user = User.new(params[:user]) …
  </code></pre>
  
  <p>The record won't fetch the new params, what is going wrong? thanks</p>
  
  <p><strong>EDIT</strong></p>
  
  <p>So 
  there is no <em>:role</em> record, just <em>:host</em> and <em>:company</em> as boolean fields in the db. Anyone?</p>