validates_presence_of executes other validations

XMLWordPrintableJSON

    • Type: Task
    • Resolution: Done
    • 12_01_17
    • Affects Version/s: None
    • Component/s: None
    • None
    • None
    • None
    • None
    • None
    • None
    • None

      class Item
         belongs_to :user, inverse_of: :items, index: true
         validates_presence_of :user
      

      When I validates_presence_of is called, it triggers execution of all validations on user as well - something I don't expect.

      For the reference, the inverse looks like this:

      class User
         has_many :items, inverse_of: :user
         validate :my_custom_validation_that_gets_called
      

            Assignee:
            Unassigned
            Reporter:
            Eugene Mirkin
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved: