Active Scaffold : Add radio buttons to your form
Posted November 18, 2010
on:The way to add radio buttons to your active scaffold create/update from is as shown below
#Controller
class UsersController < ApplicationController
active_scaffold :user do |config|
config.label = “Users”
config.columns = [:name, :gender]
config.columns[:gender].form_ui = :radio
config.columns[:gender].options[:options] = [[‘Male’, ‘1’], [‘Female’,’2′]]
end
end
Tags: active scaffold, rails
Leave a comment