Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Prefer resource method #323

Merged
merged 2 commits into from
Jul 24, 2023
Merged

Prefer resource method #323

merged 2 commits into from
Jul 24, 2023

Conversation

okuramasafumi
Copy link
Owner

#277 was closed while ago, and it's fully resolved!

@codecov
Copy link

codecov bot commented Jul 22, 2023

Codecov Report

Merging #323 (ec58245) into main (27ac98f) will increase coverage by 0.01%.
The diff coverage is 100.00%.

@@            Coverage Diff             @@
##             main     #323      +/-   ##
==========================================
+ Coverage   99.22%   99.24%   +0.01%     
==========================================
  Files          13       13              
  Lines         519      528       +9     
==========================================
+ Hits          515      524       +9     
  Misses          4        4              
Impacted Files Coverage Δ
lib/alba/resource.rb 99.61% <100.00%> (+0.01%) ⬆️

This is a way to change current behavior of when there are two
methods with the same name, one on the resource and one on the
object.
Some say they prefer defining methods instead of using `attribute`
since it's easier to type methods than type DSL.
The problem is that methods on resource are not called if there's
a method with the same name on the object.
I understand this situation and I'd like to support it.
@okuramasafumi okuramasafumi force-pushed the prefer-resource-method branch from d64e010 to ec58245 Compare July 24, 2023 09:35
@okuramasafumi okuramasafumi merged commit 24f080a into main Jul 24, 2023
@okuramasafumi okuramasafumi deleted the prefer-resource-method branch July 24, 2023 09:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant