Broken support of ActiveModel resources in 0.10.x
Nobody has claimed this yet.
Assessment
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Newbie friendliness
- 45/100
- Issue type
- Documentation
- Clarity
- Mostly clear
- Activity status
- Stale
- Tech stack
- rails, ruby
- Domain
- documentation
Research direction
Read the linked wiki page and the ActiveModel-related examples around test/fixtures/active_record.rb:1545. Verify which non-ActiveRecord resource setup works in 0.10.x, then update the wiki with a simpler working example for a service object or ActiveModel resource, including the timezone-list use case.
Written by the indexing model from the issue text.
Description
Based on gem documentation it is possible to create some service for ActiveModel resource. In fact, it does not work anymore in 0.10.x
The gem documentation has to be updated on wiki https://github.com/cerebris/jsonapi-resources/wiki/Using-JSONAPI::Resources-with-non-ActiveRecord-models-and-service-objects
There is some code examples in tests, but they are very complicated for such simple task.
https://github.com/cerebris/jsonapi-resources/blob/master/test/fixtures/active_record.rb#L1545
Please provide a real working example. It is a pain in ass to hack the gem to provide simple API for non ActiveRecord resource. I have very simple use case: returning list of all timezones via API:
ActiveSupport::TimeZone.all.map { |z| [z.name, z.to_s] }
- Dominant language
- Ruby
- Stars
- 2.3k
- Forks
- 546
- PR merge metrics
- No merged PRs in 30d
Contributor guide
No contributing guide indexed for this repository
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.
More from JSONAPI-Resources/jsonapi-resources
-
Difficulty 1/5 Under an hour Newbie friendliness 85/100
-
Difficulty 3/5 1-2 days Newbie friendliness 50/100
JSONAPI-Resources/jsonapi-resources#1488 · 1 comment ·
-
Difficulty 4/5 3-5 days Newbie friendliness 42/100
JSONAPI-Resources/jsonapi-resources#1479 · 2 comments ·
-
Difficulty 4/5 3-5 days Newbie friendliness 30/100
JSONAPI-Resources/jsonapi-resources#1477 · 3 comments · 1 reaction ·
-
Difficulty 3/5 1-2 days Newbie friendliness 45/100
All issues in JSONAPI-Resources/jsonapi-resources
Similar issues
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
-
ai-generated
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
hanami/hanami-cli#449 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
hanami/hanami-router#310 ·