1.First create scope in your model like this :-
1. scope :generalnews, -> { where(news_type: 'generalnews') }
2. scope :ceonews, -> { where(news_type: 'ceonews') }
2. in active_admin
f.input :news_type, :collection => News.all.map{|u| [u.news_type, u.id]}
www.rajanmadaan.com
ReplyDelete