Lighthouse has a new layout. Prefer the old one? Return to the old layout, and switch back any time from the link at the top of each page.

This project is archived and is in readonly mode.

ActiveModel::Validations uses Hash#except, but does not require it from ActiveSupport

#5311

Quick example:


    require 'active_model'

    class Model
      include ActiveModel::Validations
      attr_accessor :name
      validates_presence_of :name
    end

    Model.new.valid? # raises NoMethodError: undefined method `except' for {}:Hash

This was masked in the tests because the file is required elsewhere.
Patch (a simple one, of course) will be attached shortly.

Reported by Greg Campbell · August 5th, 2010 @ 08:20 PM

State: resolved
Milestone: none
Assigned to: José Valim José Valim
Importance: Low

Activity

  1. Greg Campbell
  2. Greg Campbell
    Greg Campbell
    • Tag changed from patch activemodel to activemodel, patch

    August 5th, 2010 @ 08:23 PM

  3. David Trasbo
    David Trasbo
    • Assigned user set to José Valim

    This patch seems good. Assigning it to José - maybe he'll apply it.

    August 6th, 2010 @ 07:54 AM

  4. Repository
    Repository

    (from [1577eafe77ce2a1aed3049dde34eac721b8e5aa5]) Add missing ActiveModel::Validations require

    [#5311 ActiveModel::Validations uses Hash#except, but does not require it from Activ... state: resolved]

    ActiveModel::Validations uses Hash#except, but does not require it from
    ActiveSupport. (This wasn't showing up in the tests, because it was
    required in the helper, and was also required in
    ActiveModel::Serialization).

    Signed-off-by: José Valim jose.valim@gmail.com
    http://github.com/rails/rails/commit/1577eafe77ce2a1aed3049dde34eac...

    August 14th, 2010 @ 12:23 PM

  5. Rohit Arondekar
    Rohit Arondekar
    • State changed from new to resolved
    • Importance changed from to Low

    August 14th, 2010 @ 03:22 PM