Uploaded image for project: 'Mongoid'
  1. Mongoid
  2. MONGOID-4444

Field names display and options are on prohibited_methods list

    • Type: Icon: Bug Bug
    • Resolution: Fixed
    • Priority: Icon: Major - P3 Major - P3
    • 7.0.0, 6.2.1
    • Affects Version/s: 6.2.0
    • Component/s: None
    • None
    • Environment:
      All

      Is it possible that this is a bug, since they are quite often used as field names.

      Mongoid::Errors::InvalidField (
      translation missing: sl.mongoid.errors.messages.message_title:
      translation missing: sl.mongoid.errors.messages.invalid_field.message
      translation missing: sl.mongoid.errors.messages.summary_title:
      translation missing: sl.mongoid.errors.messages.invalid_field.summary
      translation missing: sl.mongoid.errors.messages.resolution_title:
      translation missing: sl.mongoid.errors.messages.invalid_field.resolution):

      vendor/ruby/2.3.0/gems/mongoid-6.2.0/lib/mongoid/fields/validators/macro.rb:75:in `block in validate_name'
      vendor/ruby/2.3.0/gems/mongoid-6.2.0/lib/mongoid/fields/validators/macro.rb:73:in `each'
      vendor/ruby/2.3.0/gems/mongoid-6.2.0/lib/mongoid/fields/validators/macro.rb:73:in `validate_name'
      vendor/ruby/2.3.0/gems/mongoid-6.2.0/lib/mongoid/fields/validators/macro.rb:35:in `validate'
      vendor/ruby/2.3.0/gems/mongoid-6.2.0/lib/mongoid/fields.rb:268:in `field'

      Works fine in 6.1.1.

      by
      TheR

            Assignee:
            emily.stolfo Emily Stolfo
            Reporter:
            d_rems@yahoo.com Damjan Rems
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: