Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- class ProductsController < ApplicationController
- administrate_me do |a|
- f.combo :brand_id do
- Brand.all.map{|b| [b.name, b.id]}
- end
- # In case you have the to_select plugin installed you can do this
- f.combo :category_id do
- Category.to_select
- end
- # Also using a simple list of values
- f.combo :state do
- ['active', 'deleted']
- end
- end
Add Comment
Please, Sign In to add comment