Rails admin how to display the more than 100 records in dropdown list? -
railsadmin while displaying records maximum 100 only.if want customize dropdown more 100 records?
in config/initializers/rails_admin.rb need alter
railsadmin.config |config| config.model 'user' field :user_id, :enum enum_method :get_all_users end end end end
in models/user.rb
def get_all_users user.all.map{[|x|x.id,x.name]} end
ruby-on-rails ruby-on-rails-3.1 rails-admin
No comments:
Post a Comment