Can i have multiple call inside single module
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 3/5
- Tempo stimato
- 1-2 giorni
- Idoneità per principianti
- 25/100
Direzione di ricerca
Start with app/api/proj/api/v2/entities/committee.rb and compare the defined Committee and CommitteeWithSubcommittees classes with the Grape present calls. Check the corresponding standalone committee_list.rb file and determine whether the intended entity name is CommitteeWithSubcommittees or CommitteeList. Done means the intended entity can be referenced from the single file without breaking presentation.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
I want to have multiple classes inside grape entity file, this is the folder structure app/api/proj/api/v2/entities/committee.rb
module PROJ::API::V2::Entities
class Committee < Grape::Entity
expose :id
expose :name, :full_name, :email, :tag, :parent_id
expose :country do |entity, option|
entity.parent.name if entity.parent.present?
end
include Urls
private
def self.namespace_path
"committees"
end
end
class CommitteeWithSubcommittees < CommitteeBase
# include ProfilePhoto
expose :suboffices, with: 'PROJ::API::V2::Entities::CommitteeBase'
end
and inside the grape api
present @committees, with: PROJ::API::V2::Entities::Committee
is working. but if i present with
present @committees, with: PROJ::API::V2::Entities::CommitteeList
it is not working. But it works when i move it to a new file named committee_list.rb inside entities
- Lingua principale
- Ruby
- Stelle
- 730
- Fork
- 155
- Metriche di merge delle PR
- Nessuna PR unita negli ultimi 30g
Preparare l'ambiente
- Nessun Dockerfile né file Docker Compose
- Nessun modello di pull request
- Leggi la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di ruby-grape/grape-entity
-
Difficoltà 5/5 Più di una settimana Idoneità per principianti 25/100
ruby-grape/grape-entity#386 · 7 commenti · 1 reazione ·
-
Difficoltà 4/5 3-5 giorni Idoneità per principianti 35/100
ruby-grape/grape-entity#382 ·
-
Difficoltà 4/5 3-5 giorni Idoneità per principianti 35/100
ruby-grape/grape-entity#380 ·
-
Difficoltà 3/5 1-2 giorni Idoneità per principianti 35/100
ruby-grape/grape-entity#373 · 2 commenti ·
-
Truncate FormatterAperta
Difficoltà 1/5 1-3 ore Idoneità per principianti 45/100
ruby-grape/grape-entity#372 ·
Tutte le issue di ruby-grape/grape-entity
Issue simili
-
Component: Ruby Type: bug
Difficoltà 2/5 1-3 ore Idoneità per principianti 74/100
I maintainer di solito rispondono entro 1 giorno
-
chore
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 78/100
AllYourBot/hostedgpt#818 · 4 commenti ·
I maintainer di solito rispondono entro 1 giorno
-
bug
Difficoltà 2/5 1-3 ore Idoneità per principianti 62/100
I maintainer di solito rispondono entro 1 giorno
-
Použiť Redis pre ActionCableAperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 65/100
slovensko-digital/autogram-portal#392 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 65/100
voxpupuli/puppet-quadlets#122 · 5 commenti ·
I maintainer di solito rispondono entro 1 giorno