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.

TMaYaD's latest activity

Saturday, February 19 2011
1943 Nested attributes validations circular dependency was updated in Ruby on Rails
  • TMaYaD
    TMaYaD commented at 8:39 PM

    A variant to Ari Epstine's work around is using before_add callback
    class Person < ActiveRecord::Base
    has_many :children, :before_add => :set_nest accepts_neste...

Tuesday, August 10 2010
5341 _validators works on ActiveRecord::Base instead of individual models was updated in Ruby on Rails
  • TMaYaD
    TMaYaD commented at 6:38 AM

    This fixes it
    http://github.com/TMaYaD/rails/commit/8a7e5bd076833d55819102919e453...

    May need refactoring and definitely needs tests

  • TMaYaD
    • Title changed from Validators_on an attribute of nested model returns validatations on attribute with same name from parent model to _validators works on ActiveRecord::Base instead of individual models
    by TMaYaD at 5:38 AM
  • TMaYaD
    • Assigned user set to José Valim
    • Tag changed from nested_attributes_for, reflection, validation, validations to reflection, validation, validations
    by TMaYaD at 3:02 AM

    Probing further it seems this behavior is universal and not limited to nested attributes
    The validations keep piling up to the previously queried ones

    In the di...

  • TMaYaD
    TMaYaD commented at 1:54 AM

    Something really funny is going on here.

    $ rails c
    Loading development environment (Rails 3.0.0.beta4)
    ruby-1.9.2-rc2 > Ingredient.validators_on(:name)
     => [] ...
Monday, August 09 2010
5341 Validators_on an attribute of nested model returns validatations on attribute... was created in Ruby on Rails
  • TMaYaD
    TMaYaD created the ticket at 7:43 PM

    When I have

    # app/model/ingredients.rb
    class Ingredient < ActiveRecord::Base
      attr_accessible :product, :name, :quantity
      belongs_to :product
      validates :pr...
Sunday, May 02 2010
1943 Nested attributes validations circular dependency was updated in Ruby on Rails
  • TMaYaD
    • Tag changed from code to nested attributes, code, nested_attributes_for
    by TMaYaD at 6:07 PM
  • TMaYaD
    TMaYaD commented at 5:54 PM

    I think we still need to fix it.
    In case of a nested resource with its own form, we might want to validate that the child does indeed belong to a parent even if...