rails-admin

    0熱度

    1回答

    我想在我的應用程序中使用rails_admin。我不使用device或cancancan寶石。 我該如何拒絕訪問rails_admin儀表板如果current_user.admin?爲假?

    0熱度

    1回答

    我使用Rails 5,Rails的管理和MongoId,在我的模型,我加 has_and_belongs_to_many :topics, class_name: 'Topic', :foreign_key => :topicIds 它與「編輯頁面」,但不工作當我嘗試更改topicIds的值時 message: Attempted to set a value for 'topic_ids'

    0熱度

    1回答

    我有兩個型號:Company和Salesperson看起來像這樣: class Company < ActiveRecord::Base belongs_to :salesperson end class Salesperson < ActiveRecord::Base has_many :companies end 在Rails_Admin,當我試圖指派一名銷售人

    0熱度

    1回答

    我有這樣的配置: question.rb class Question belongs_to :asker belongs_to :expert end user.rb class User has_one :asker has_one :expert end 我設置rails_admin,我不能由於錯誤而編輯任何問題。 ActionContro

    0熱度

    1回答

    我想把一個fileUploader上傳一些文件到數據庫。 我按照rails_admin wiki上的步驟操作,但無法使其工作。具體來說,fileUploader不會出現在視圖中。誰能提供建議? class Peca < ActiveRecord::Base mount_uploaders :documento, DocumentoUploader belongs_to :cli

    1熱度

    1回答

    我有一個has_many文檔的模型用戶。 在用戶模型的展示頁面上,我想顯示每個文檔的名稱。 此刻,我可以列出所有文檔對象,但不能訪問每個文檔的詳細信息。 感謝您的幫助

    0熱度

    1回答

    我正在Rails 5中使用rails_admin。我有一個型號爲Hotel的關聯images(has_many)。目前我使用rails_admin的默認配置,並且在Hotel show頁面,一個酒店的圖像顯示格式爲: Image #5381, Image #5382, Image #5383, Image #5384, Image #5385,... 如何顯示這些圖像畫廊給每個圖像具有thum

    2熱度

    1回答

    我有一個Rails服務器,其中nginx路由/到/api,並且我安裝了rails_admin gem。我可以訪問管理面板/api/admin,但管理頁面上列出的所有型號鏈接到/admin/:model。我似乎無法找到一種方法讓鏈接路由到/api/admin/:model。 我已在application.rb如下: config.relative_url_root = "/api" config.

    0熱度

    1回答

    我安裝了rails_admin gem。我搭建了一個名爲account_types的資源。它顯示在軌道管理員成功。但是當我git恢復我的項目以刪除account_types時,rails_admin仍然嘗試加載新的資源account_types。 我嘗試以下。 再生的rails_admin rails g rails_admin:install 清除緩存 rake tmp:clear 卸載

    1熱度

    1回答

    我有作文和語言之間的關係。一種作品應該用一種且只有一種語言書寫。 我schema.rb包含以下行: ... create_table "compositions", force: :cascade do |t| ... t.integer "product_language_id", null: false end ... add_foreign_key "compo