beezwax/fmrest-ruby

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

pilaf opened this issue · 0 comments

pilaf commented

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).