my first choice to preset radio- or checkbox-selections would be setting them in the new-action of the according controller
#app/models/user.rb
class User < ActiveRecord::Base
belongs_to :department
end
#app/models/department.rb
class Department < ActiveRecord::Base
has_many :users
end
#app/controllers/users_controller.rb
# GET /users/new
# GET /users/new.xml
def new
@user = User.new
@user.department_id= Department.find_by_name('IT')
respond_to do |format|
format.html # new.html.erb
format.xml { render :xml => @user }
end
end
#app/views/users/_form.html.erb
<%= simple_form_for(@user) do |f| %>
<%= f.input :name %><br />
<%= f.input :age %>
<%= f.association :department, :as => :radio %>
<%= f.button :submit %>
<% end %>
In your case you might just preset your 'new' object in your objects controller new-action with the according string
def new
@myobject = Myobject.new
@myobject.weight_unit= "Lbs"
respond_to
...
end