Unable to update the database table using forms

My forms looks like this and it is for UserPreference Model

user_preference.rb

<%= form_for @user_preference do |u|%>

<%= u.label :title %>
<%= u.text_field :title %>

<%= u.label :description %>
<%= u.text_field :description %>

<%= u.label :back_ground_color %>
Orange Green Blue Pink Yellow White

<%= u.label :font %>
Times new Roman Verdana Arial serif


<%= u.submit %>

user_preferences_controller.rb looks like this:
class UserPreferencesController < ApplicationController
def new
@user_preference = UserPreference.new
end

def create
@user_preference = UserPreference.new(userp_params)
@user_preference.save unless user_signed_in?
render plain: params[:user_preference].inspect
end
def edit
end
def update
end

private
def userp_params
params.require(:user_preference).permit(:title, :bgcolor, :font,
:description)
end
end

When I am trying to render params for user_preference I am getting only
title and description

On 22 April 2015 at 09:05, Manish K. [email protected] wrote:


When I am trying to render params for user_preference I am getting only
title and description

Look in development.log to see what happens when you perform the
submit. Then you will see what params are being passed in, and the
sql performed.

However I would have expected to see calls to u.select( … ) rather
than straight html for the select boxes.

Colin