1

我注释掉了 has_many ,但是在重启 rails 服务器后,同一个导出页面有很多

 config.model 'User' do

  #   # You can copy this to a 'rails_admin do ... end' block inside your user.rb model definition

  #   # Found associations:

      # configure :canvases, :has_many_association 
      # configure :level, :has_many_association 
      # configure :tags, :has_many_association 

  #   # Found columns:

      configure :id, :integer 
      configure :name, :string 
      configure :email, :string 
      configure :raw_info, :serialized 
      configure :created_at, :datetime 
      configure :updated_at, :datetime 
4

1 回答 1

0

实际上,您应该删除注释以强制执行特定配置。

尝试这个:

configure :canvases, :has_many_association do hide end  
configure :level, :has_many_association do hide end  
configure :tags, :has_many_association do hide end  
于 2012-12-13T04:13:21.707 回答