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

Feat/apple feed subclass #1013

Merged
merged 9 commits into from May 14, 2024
Merged

Feat/apple feed subclass #1013

merged 9 commits into from May 14, 2024

Conversation

radical-ube
Copy link
Contributor

adds a Feed::AppleSubscription subclass in preparation for Apple Subscription UI work.

@@ -0,0 +1,5 @@
class Feed::AppleSubscriptionPolicy < ApplicationPolicy
def show?
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

maybe could leave this out until UI PR? i think this got added in a commit before realizing which branch i was in.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yep - I think you can delete this. You shouldn't need it at all, since you set self.model_name to Feed in the model. That causes the child-model to use the policy of the parent.

Copy link
Member

@cavis cavis left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm liking the direction of this! A couple comments/gotchas (mostly trying to untangle some existing logic/rules).

But I think this will be a good direction to go in!

app/models/apple/config.rb Show resolved Hide resolved
@@ -0,0 +1,5 @@
class Feed::AppleSubscriptionPolicy < ApplicationPolicy
def show?
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yep - I think you can delete this. You shouldn't need it at all, since you set self.model_name to Feed in the model. That causes the child-model to use the policy of the parent.

app/models/feed/apple_subscription.rb Outdated Show resolved Hide resolved
app/models/feed/apple_subscription.rb Outdated Show resolved Hide resolved
app/models/feed/apple_subscription.rb Outdated Show resolved Hide resolved
app/models/feed/apple_subscription.rb Outdated Show resolved Hide resolved
app/models/feed/apple_subscription.rb Outdated Show resolved Hide resolved
app/models/apple/config.rb Outdated Show resolved Hide resolved
app/models/feed/apple_subscription.rb Outdated Show resolved Hide resolved
Copy link
Member

@cavis cavis left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍 looks good to me!

@radical-ube radical-ube merged commit 360f44d into main May 14, 2024
3 checks passed
@radical-ube radical-ube deleted the feat/apple_feed_subclass branch May 14, 2024 14:07
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.

None yet

2 participants