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

validate false positive when property name is Object method #17

Open
fran-worley opened this issue Aug 9, 2016 · 0 comments
Open

validate false positive when property name is Object method #17

fran-worley opened this issue Aug 9, 2016 · 0 comments

Comments

@fran-worley
Copy link
Contributor

See trailblazer/reform#314 for conversation.

Original description:

Might not be only Object methods, but is definitely at least those:

require "reform/form/active_model/validations"
class BadForm < Reform::Form
  include Reform::Form::ActiveModel::Validations

  property :trust        # or anything from `Object.public_methods`
  validates :trust, presence: true
end

BadForm.new(Struct.new(:trust).new).validate({})
# => true
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

No branches or pull requests

1 participant