-
Notifications
You must be signed in to change notification settings - Fork 130
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
"api is not defined as an attribute on" warnings on enumeration #188
Comments
Good catch @timdorr! Maybe instead of checking |
Resolves #188 * Tests will fail if model initialize discards API again
@HayleyCAnderson It looks like 4.2.3 was published prior to that fix going in: https://rubygems.org/gems/nylas/versions Looks like someone bumped the version without committing/pushing the change back to this repo. Not sure what you want to do, but it looks like a 4.2.4 release would be warranted. |
Wow, thanks for catching that. Sorry about that; just put up 4.2.4 https://rubygems.org/gems/nylas/versions/4.2.4 |
No worries. Thank you! |
I'm seeing errors like this when using the
.each
iterator on anyCollection
object:And just to confirm that I'm not totally crazy, it looks like you are too: https://travis-ci.org/nylas/nylas-ruby/jobs/406871743
The source of the issue is merging in the
api
instance to the model initialize method:nylas-ruby/lib/nylas/collection.rb
Line 65 in b8623d4
During the model initialize method in the
Attributable
decorator, it checks for that field as an attribute definition:nylas-ruby/lib/nylas/model/attributable.rb
Lines 9 to 17 in b8623d4
While that's an
attr_accessor
onModel
, it's not anattribute
class definition and fails that check.I'm not sure what the best course of action would be here (hence the issue instead of PR). You could whitelist that attribute, define it on the
Model
as a default for all models, or not merge it and pass it in some other way. I'm not sure what's best, but if you have some opinion about it, I can put together a PR.The text was updated successfully, but these errors were encountered: