2
は、ダッシュボードには、二度のモデルが表示され、下のスクリーンショットを考慮してください。rails-adminにモデル名を複製しないようにするには?レール-Adminを使用し
RailsAdmin.config do |config|
## == Devise ==
config.authenticate_with do
warden.authenticate! scope: :user
end
config.current_user_method(&:current_user)
## == Cancan ==
# config.authorize_with :cancan
## == Pundit ==
# config.authorize_with :pundit
## == PaperTrail ==
# config.audit_with :paper_trail, 'User', 'PaperTrail::Version' # PaperTrail >= 3.0.0
### More at https://github.com/sferik/rails_admin/wiki/Base-configuration
config.actions do
allowable_models = ['Lab', 'Order']
dashboard do
only allowable_models
end
index do
only allowable_models
end
show do
only allowable_models
end
new do
only allowable_models
end
edit do
only allowable_models
end
delete do
only allowable_models
end
## With an audit adapter, you can add:
# history_index
# history_show
end
end
本当に私限りのオブジェクトが2回表示されていることは問題ではなく、ありませんこの宝石を理解して、オブジェクトを2度表示しないでください。私はそれを修正したいと思います。ここに何を掘り起こすべきなのか?
ありがとうございます!
あなたが管理者の初期化子あなたのレールを追加してくださいすることができます。 –
@AlokSwainさんに感謝しました – John