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

Only mapped attributes should have accessors, the original field names should not #11

Open
pilaf opened this issue Jun 17, 2019 · 0 comments
Labels
bug Something isn't working enhancement New feature or request

Comments

@pilaf
Copy link
Collaborator

pilaf commented Jun 17, 2019

Currently if you define a mapped attribute, the original FileMaker attribute name will get a writer method due to how Spyke works (uses method_missing).

E.g.

class Foo < FmRest::Spyke::Base
  attributes foo: "FooBar"
end

f = Foo.new

f.FooBar = "oopsie!" # this will work, but it shouldn't!
f.foo # => "oopsie!"

Only the mapped version should work (e.g. foo= in the above example).

@pilaf pilaf added invalid This doesn't seem right bug Something isn't working enhancement New feature or request and removed invalid This doesn't seem right labels Jun 17, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant