-
-
Notifications
You must be signed in to change notification settings - Fork 31
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
Support activestorage #195
Conversation
gem_rbs_collection with symlink is supported on or after Should I wait for the release of rbs v1.7.0 for this PR? |
sigs = [] | ||
|
||
# Needs to require "active_storage/engine" | ||
if klass.respond_to?(:attachment_reflections) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
attachment_reflections
will be defined after "active_storage/engine" is required, and will not be defined if it is not required.
|
||
# Needs to require "active_storage/engine" | ||
if klass.respond_to?(:attachment_reflections) | ||
sigs << "module GeneratedAssociationMethods" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
|
||
if klass.respond_to?(:attachment_reflections) | ||
klass.attachment_reflections.each do |name, _reflection| | ||
sigs << "def #{prefix}with_attached_#{name}: () -> #{relation_class_name}" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
def build_avatar_blob: (untyped) -> ActiveStorage::Blob | ||
def create_avatar_blob: (untyped) -> ActiveStorage::Blob | ||
def create_avatar_blob!: (untyped) -> ActiveStorage::Blob | ||
def reload_avatar_blob: () -> ActiveStorage::Blob? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
693b0ea
to
4f21af3
Compare
Rebased and use rbs 1.7.0. But I have not been able to solve the CI problem.
CI seems to be down with the following problems. |
I resolved CI problem! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks! 🚀
I've reverted some commits because they are no longer needed on the master branch. And I've merged master into this PR to check it runs on master branch. |
Thank you so much ✨ |
activestorage adds some methods to activerecord model.