ruby-grape / ruby-grape/grape-entity
Unexpose always throw exception
Nobody has claimed this yet.
- Dominant language
- Ruby
- Stars
- 729
- Forks
- 154
- PR merge metrics
- No merged PRs in 30d
Description
class Sticker < Grape::Entity
expose :id
expose :thumb do |model, opts|
model.thumb.url
end
end
class StickerMess < Sticker
expose :description, :times
unexpose :thumb
end
The grape server mount as api of rails
: rails s
Users/benyu/.rvm/gems/ruby-2.0.0-p598/gems/railties-4.0.0/lib/rails/application/routes_reloader.rb:10:in `rescue in execute_if_updated': Rails::Application::RoutesReloader#execute_if_updated delegated to updater.execute_if_updated, but updater is nil: #<Rails::Application::RoutesReloader:0x007ff1c79eded0 @paths=["/Users/benyu/www/babe/config/routes.rb"], @route_sets=[#ActionDispatch::Routing::RouteSet:0x007ff1c4722fa0]> (RuntimeError)
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reproducing the Sticker and StickerMess exposure example in a Rails-mounted Grape server using the reported Ruby and Rails versions. Trace the unexpose :thumb path and the Rails route reloader failure; done means the server starts without the reported exception and unexpose behaves as intended.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rails, ruby
- Domain
- api, backend
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100