Permalink
Switch branches/tags
Commits on Nov 9, 2018
  1. Clarify the validation of present associations

    Ana06 committed Nov 9, 2018
    I think that it is not clear what means that _an association is
    present_. Add that it is checking that the foreign key is not empty and
    that the referenced object exists to clarify it.
Commits on Aug 8, 2018
  1. Add tests for privates methods in view's helpers

    Ana06 committed Aug 8, 2018
    Test that using private methods in `options_from_collection_for_select`
    is deprecated.
    
    Make the unused `secret` paramether in the `Post` Struct private to use
    it in the test.
  2. Deprecate use of private methods in view's helpers

    Ana06 committed Aug 8, 2018
    Instead of dropping it completely in case someone is relying (probably
    inadvertenly) on it.
  3. Use public_send in extract_values_from_collection

    Ana06 committed Aug 8, 2018
    Avoid exposing private methods in view's helpers. However, as
    `extract_values_from_collection` is only called from
    `options_from_collection_for_select` where `value_for_collection` is
    previously called, this case was already covered. The change makes
    anyway sense for consistency and in case the code changes in the
    future.
Commits on Aug 7, 2018
  1. Use public_send in value_for_collection

    Ana06 committed Aug 7, 2018
    Avoid exposing private methods in view's helpers.
    
    Fixes #33546
  2. Add lambdas in conditional validations

    Ana06 committed Aug 7, 2018
    As `Lambdas` are a type of `Proc`, they can also be used in the
    `if`/`unless` option of a validation to decide when the validation is
    executed. Add this case to the guide for clarification.
    
    Closes #33212